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.
I want to do a specific calcul with DAX in power BI.
I want to apply last_update function to have the lastupdate cumul_Value of each group :
I have a database looks like :
cumul_Value = sum(Value)
time Group cumul_Value
1/1 A 2
2/1 A 4
3/1 A 5
1/1 B 4
2/1 B 5
3/1 B 9
1/1 C 3
2/1 C 4
3/1 C 5
I want to apply DAX forlmula to create the table:
time Group cum_value_last_update
3/1 A 5
3/1 B 9
3/1 C 5
I was using CALCULATE, FILTER :
last_update = FILTER(
ALL([time]) ;
[time]= MAX([time]) )
cum_value_last_update= CALCULATE( [cumul_Value];
FILTER(
ALL(time) ;
time= last_update )
)
this function return a unique value for all groups...
I want to apply the last update filter to have the cumul_values of each groups A, B ,C
Do you have a solution ?
Solved! Go to Solution.
How about this
cum_value_last_update= CALCULATE( [cumul_Value];
Lastnonblank( calendar[time],1))
dont put date in the table, just group and the above measure. I think it will work.
Hi matheiu,
Measure = Calculate (Sum(Cum_Value),Filter(All("Time"),Time=Max(Time)),
Try this one it will help u if not let me know. i will help u
Just change the measure as
cum_value_last_update = CALCULATE(sum(sampleTbl[cumul_Value]), FILTER( ALL(sampleTbl[time]) , sampleTbl[time]= MAX([time]) ) )
I try it and that works but not so strong with the Total.
That retruns for my total the C group value ...
Is there a way to filtrer last value of my groups when dates wasn't the same
=========================================> time
A
============== 03/01/2016
B
====== 01/01/2016
C
=========================================10/01/2016
How about this
cum_value_last_update= CALCULATE( [cumul_Value];
Lastnonblank( calendar[time],1))
dont put date in the table, just group and the above measure. I think it will work.
Covering 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 |
---|---|
109 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |