Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
117 | |
101 | |
71 | |
61 |