Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I would like to ask how to make a measure which calculates sum according to the end date of slicer. I mean when we turn left or turn right this:
I have used this expression but it didn't help me
Solved! Go to Solution.
Hi, @Analitika
You should use all tables and save 'maxdate' as a variable first, otherwise it will be affected.
Try like this:
maxdatetotalvalue =
VAR maxdate =
MAXX ( ALLSELECTED ( 'Table1' ), [Date] )
RETURN
SUMX ( FILTER ( ALL ( 'Table1' ), [Date] = maxdate ), [Value] )
Below is my sample and two wrong results for reference.
Hi, @Analitika
You should use all tables and save 'maxdate' as a variable first, otherwise it will be affected.
Try like this:
maxdatetotalvalue =
VAR maxdate =
MAXX ( ALLSELECTED ( 'Table1' ), [Date] )
RETURN
SUMX ( FILTER ( ALL ( 'Table1' ), [Date] = maxdate ), [Value] )
Below is my sample and two wrong results for reference.
Hi @Analitika ,
I can more specifically if you could share sample data in text format with expected output.
But you can try below code:-
measure =
VAR _start_date =
MIN ( date[date] )
VAR _end_date =
MAX ( date[date] )
RETURN
CALCULATE (
SUM ( table[column] ),
table[date] >= _start_date
&& table[date] <= _end_date
)
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
But it didn't work.
Here is my formula.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |