Forum Discussion
how to show default KPI value using DAX
- 9 years ago
Hi MFelix,
My Requirement was littel different. If no interaction is happening then it Card should show the value of North Asia, If any ineraction happened on Bar Chart then it should show the selected value result in card from Bar chart.
After few hit and trail I am able to do the same by taking reference from DAX HASONEFILTER Function (DAX)
My Logic :
Measure 2 = IF(HASONEFILTER(Data[Geo]),ROUND( (SUM(Data[Market Growth])*100),1)&"%" &"("& FILTERS(Data[Geo])&")",
CALCULATE(ROUND( (SUM(Data[Market Growth])*100),1) &"% (North Asia)",Data[Geo]="North Asia"))No interaction in above chart and able to show Default value of North Asia.
interaction happen on bar chart and selected DVM in above chart and able to show DVM Value.
Anyways thanks for your effort.
Hi SandySharma,
I don't know how you are calculating the Numeric Market Growth but in my example I have made a simple table with Country and Values
Made a simple measure to calculate the % per country:
% Total =
MAXX (
Table1,
Table1[Values] / CALCULATE ( SUM ( Table1[Values] ), ALL ( Table1 ) )
)
You need to wrap your measure in a MAXX formual something like this:
Number Market Share_Max = MAXX(Data,[Number Market Growth])
Should make the trick.
Regards,
MFelix
Hi MFelix,
My Requirement was littel different. If no interaction is happening then it Card should show the value of North Asia, If any ineraction happened on Bar Chart then it should show the selected value result in card from Bar chart.
After few hit and trail I am able to do the same by taking reference from DAX HASONEFILTER Function (DAX)
My Logic :
Measure 2 = IF(HASONEFILTER(Data[Geo]),ROUND( (SUM(Data[Market Growth])*100),1)&"%" &"("& FILTERS(Data[Geo])&")",
CALCULATE(ROUND( (SUM(Data[Market Growth])*100),1) &"% (North Asia)",Data[Geo]="North Asia"))
No interaction in above chart and able to show Default value of North Asia.
interaction happen on bar chart and selected DVM in above chart and able to show DVM Value.
Anyways thanks for your effort.