MarkCBB
Active Member
- Joined
- Apr 12, 2010
- Messages
- 497
Hi there,
The title of this post needs some explanation.
I have a column in a table called "Sales Ranking" (contains Text Entries, i.e. "CORE", "BLOCKED", "OPEN" etc...)
I have created a Measure to calculate the Sales value of the "CORE" Items, The measure works well. (See below)
(%) CORE CONT = CALCULATE(SUM('VALUES'[AMOUNT]),'VALUES'[YEAR]=YEAR(TODAY()),'VALUES'[VALUE TYPE]="VALUE",MAIN[SALES RANKING]="CORE")/CALCULATE(SUM('VALUES'[AMOUNT]),'VALUES'[YEAR]=YEAR(TODAY()),'VALUES'[VALUE TYPE]="VALUE")
The above takes the Total Amount of "CORE" "Values" for YTD and divides it by Total amount of "VALUES"
The challenge I have is that I have an existing Visual (Bar Chart) that uses "Sales Ranking" as an Axis (It using a different Value for the chart, not the Measure), and when I click on any of the Items (CORE, BLOCKED, OPEN etc..) the Result of the Measure called "(%) CORE CONT" gives out strange Results. I assume that this is due to the Sales ranking items being used in the Measure?
I have found 2 ways to Get around this, However I doubt that this is the best way to do this.
Work around 1:
I duplicated the "Sales Ranking" Column and used this new column in the Measure.
Work Around 2:
I created a new Table that contains a Unique List of the "Sales Ranking" items and created a relationship between this new table and the "Sales Ranking" Column in the original Table.
As mentioned, I do not think that the above 2 work around's are the best approach and I am sure there is something in the DAX measure that can be done to get around this?
I look forward to any responses regarding the above.
Thanks
The title of this post needs some explanation.
I have a column in a table called "Sales Ranking" (contains Text Entries, i.e. "CORE", "BLOCKED", "OPEN" etc...)
I have created a Measure to calculate the Sales value of the "CORE" Items, The measure works well. (See below)
(%) CORE CONT = CALCULATE(SUM('VALUES'[AMOUNT]),'VALUES'[YEAR]=YEAR(TODAY()),'VALUES'[VALUE TYPE]="VALUE",MAIN[SALES RANKING]="CORE")/CALCULATE(SUM('VALUES'[AMOUNT]),'VALUES'[YEAR]=YEAR(TODAY()),'VALUES'[VALUE TYPE]="VALUE")
The above takes the Total Amount of "CORE" "Values" for YTD and divides it by Total amount of "VALUES"
The challenge I have is that I have an existing Visual (Bar Chart) that uses "Sales Ranking" as an Axis (It using a different Value for the chart, not the Measure), and when I click on any of the Items (CORE, BLOCKED, OPEN etc..) the Result of the Measure called "(%) CORE CONT" gives out strange Results. I assume that this is due to the Sales ranking items being used in the Measure?
I have found 2 ways to Get around this, However I doubt that this is the best way to do this.
Work around 1:
I duplicated the "Sales Ranking" Column and used this new column in the Measure.
Work Around 2:
I created a new Table that contains a Unique List of the "Sales Ranking" items and created a relationship between this new table and the "Sales Ranking" Column in the original Table.
As mentioned, I do not think that the above 2 work around's are the best approach and I am sure there is something in the DAX measure that can be done to get around this?
I look forward to any responses regarding the above.
Thanks