Forum Discussion
Anonymous
8 years agoNot applicable
Percentage Difference between cards
Hello, I am having trouble creating a measure that would display the percentage difference between two cards I have. Both cards are of the same aggregated fact, but one of the cards is filtered by a ...
- 8 years ago
Hi Anonymous,
Assuming that you have the value from the slicer is based on the column Manufacturer try to change your measure to the one below the bold part of the measure is what is different:
Count of BlockId % difference from Corporation = VAR __BASELINE_VALUE = CALCULATE( DISTINCTCOUNT('Data'[BlockId]), ALLSELECTED( 'Data'[Manufacturer] ) ) VAR __MEASURE_VALUE = DISTINCTCOUNT('Data'[BlockId]) RETURN IF( NOT ISBLANK(__MEASURE_VALUE), DIVIDE(__BASELINE_VALUE, __MEASURE_VALUE) )Regards,
MFelix
MFelix
8 years agoSuper User
Hi Anonymous,
Assuming that you have the value from the slicer is based on the column Manufacturer try to change your measure to the one below the bold part of the measure is what is different:
Count of BlockId % difference from Corporation =
VAR __BASELINE_VALUE =
CALCULATE(
DISTINCTCOUNT('Data'[BlockId]),
ALLSELECTED( 'Data'[Manufacturer] )
)
VAR __MEASURE_VALUE = DISTINCTCOUNT('Data'[BlockId])
RETURN
IF(
NOT ISBLANK(__MEASURE_VALUE),
DIVIDE(__BASELINE_VALUE, __MEASURE_VALUE)
)Regards,
MFelix