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.
Hi guys,
I'm trying to create a measure that shows me the sum of outstanding amounts in the current month based on the amounts that occurred in the previous month. I need to put this total amount on the card. Can you help me, please?
Solved! Go to Solution.
Hi, @flaviobdsti
You can try the following methods.
Measure:
JAN = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),MONTH([Date])=1&&[ID]=SELECTEDVALUE('Table'[ID])))
FEB = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),MONTH([Date])=2&&[ID]=SELECTEDVALUE('Table'[ID])))
Measure = SUMX(FILTER(ALL('Table'),[FEB]=BLANK()&&MONTH([Date])=1),[JAN])
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @flaviobdsti
You can try the following methods.
Measure:
JAN = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),MONTH([Date])=1&&[ID]=SELECTEDVALUE('Table'[ID])))
FEB = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),MONTH([Date])=2&&[ID]=SELECTEDVALUE('Table'[ID])))
Measure = SUMX(FILTER(ALL('Table'),[FEB]=BLANK()&&MONTH([Date])=1),[JAN])
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks a lot for the precious help.
Is there any reason you can't do SUM(January) - SUM(February)?
It doesn't work because Jan (last month) and Feb (current month) are measured:
Current month = CALCULATE(SUM(BillsReceive[value_document]),GROUPBY(dimIDJ,dimIDJ[IDJ]))
Last month = CALCULATE([Current month],DATEADD(dimCalendar[Date],-1,MONTH))
I get the desired result only when I add the measures in a table and configure a filter on the screen for the current month (feb) = blank()
But I need to be able to do this in a measure to add to a card
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 |
---|---|
42 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
39 | |
33 | |
18 | |
17 |