Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Gurus,
I am using VitaraChart to display a report as the below picture
Column Last Value: I am using aggregate is Last
Column Sum: I am using aggregate is SUM.
The Recruited Headcount column have to be SUM because it is the new value every day.
The Remaining Headcount should be the last value by time.
My question is: Can I have a measure to calculate when KPI is Recruited Headcount, the aggregate is SUM
and when KPI is Remaining Headcount then the aggregate is Last value?
Then I can replace those columns by the new measure as expected.
Thanks,
Truong
Solved! Go to Solution.
Hi @truongphan,
You can use the SWITCH function to make this you have to do something like this:
KPI Value = SWITCH ( TRUE (), MAX ( KPI_Table[KPIs] ) = "Recruited Headcount", SUM ( KPI_Table[Value] ), MAX ( KPI_Table[KPIs] ) = "Remaining Headcount", LASTNONBLANK ( KPI_Table[Value], MAX ( KPI_Table[Date] ) ), BLANK () )
On this formula the only thing I don't know it will work is the MAX ( KPI_Table[Date] ) since I don't know if you have a date column.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @truongphan,
You can use the SWITCH function to make this you have to do something like this:
KPI Value = SWITCH ( TRUE (), MAX ( KPI_Table[KPIs] ) = "Recruited Headcount", SUM ( KPI_Table[Value] ), MAX ( KPI_Table[KPIs] ) = "Remaining Headcount", LASTNONBLANK ( KPI_Table[Value], MAX ( KPI_Table[Date] ) ), BLANK () )
On this formula the only thing I don't know it will work is the MAX ( KPI_Table[Date] ) since I don't know if you have a date column.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |