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;
I want to calculate the cumulative of sales quantity of the previous 5 months without counting the current also I want it to be dynamic depending on the current month.
Data example bellow
Solved! Go to Solution.
Hi,
Drag this measure to a card visual
=CALCULATE([Cantidad],DATESBETWEEN(Calendar[Date],EDATE(EOMONTH(TODAY(),-1)+1,-5),EOMONTH(TODAY(),-1)+1))
Hope this helps.
Hi,
Drag this measure to a card visual
=CALCULATE([Cantidad],DATESBETWEEN(Calendar[Date],EDATE(EOMONTH(TODAY(),-1)+1,-5),EOMONTH(TODAY(),-1)+1))
Hope this helps.
It Works, thank you.
You are welcome.
Hi @Anonymous ,
Try the following measure:
Sum Last 5 Months = CALCULATE ( SUM ( 'Table'[Quantity] ); DATESINPERIOD ( 'Table'[Date]; MAX ( 'Table'[Date] ); -6; MONTH ) ) - SUM ( 'Table'[Quantity] )
Replace the table name by the your data. If the date column is on a different table just change also that column to the correct one.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsIt doesn't work because I have a data since 2016.
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |