Forum Discussion
Using 2 measures from duplicate tables in the same table for comparison
Hi Everyone
I have 2 slicers. Both on the same 'score' field. I duplicated my scores table so each slicer impacts one.
| Score | Value |
| 1 | a |
| 2 | b |
| 3 | c |
4 | d |
| 5 | e |
I have 2 slicers, lets say one slices the score between 1-2 and the other slicing between 3-5.
I create a CountA measure to count how many times each value appears in the score range above.
| Value | Wordcount1 (slicer one) | Wordcount2 (slicer 2) |
| a | ||
| b | ||
| c | ||
| d | ||
| e |
I want to be able to compare the word counts based on 2 different slicers, so I need them in a table with a new column to show difference (delta)
The problem arises when I put both counts on the same table,does not work because of the filter context.
When the measures are in separate tables. It works fine. I just need wordcount2 to count from the relevant table without interference from values and wordcount1
Hi Anonymous,
Create 2 slicer tables as below:
slicer table1 = VALUES('Table'[Score])slicer table2 = VALUES('Table'[Score])Then create 2 measures as below:
Measure based on slicer 1 = CALCULATE(COUNT('Table'[Value]),'Table'[Score] in FILTERS('slicer table1'[Score]))Measure based on slicer 2 = CALCULATE(COUNT('Table'[Value]),'Table'[Score] in FILTERS('slicer table2'[Score]))And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
1 Reply
- v-kelly-msftCommunity Support
Hi Anonymous,
Create 2 slicer tables as below:
slicer table1 = VALUES('Table'[Score])slicer table2 = VALUES('Table'[Score])Then create 2 measures as below:
Measure based on slicer 1 = CALCULATE(COUNT('Table'[Value]),'Table'[Score] in FILTERS('slicer table1'[Score]))Measure based on slicer 2 = CALCULATE(COUNT('Table'[Value]),'Table'[Score] in FILTERS('slicer table2'[Score]))And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!