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 would like to have a card in the dashboard that shows the difference between the unit sales of current month (from the beggining of March until today, day 14 of March) and the unit sales of last month (from the beggining of Febreary until day 14 of Febreary).
Is that possible?
Thanks you so much!!!
Solved! Go to Solution.
Hi @ContabilidadBI,
In this example I have made I have linked it to a slicer if you don't make any selection and your data finish on March 14 it will give you current month on the measure. Measure are based on context and when you do a MTD it will fetch the maximum date on your table.
Just in case change the PM to
Total MTD PM = var select_date = MAX(Data[Date] ) return TOTALMTD(SUM(Data[Total]);CALCULATETABLE(DATEADD(Data[Date];-1;MONTH);Data[Date]= select_date))
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português
You just need to make this measures:
TotalMT = TOTALMTD(SUM(Data[Total]);Data[Date]) Total MTD PM = TOTALMTD(SUM(Data[Total]);DATEADD(Data[Date];-1;MONTH) ) Difference = [TotalMT]-[Total MTD PM]
You can do a single measure with:
Difference = TOTALMTD(SUM(Data[Total]);Data[Date]) - TOTALMTD(SUM(Data[Total]);DATEADD(Data[Date];-1;MONTH) )
The TotalMTD calculates the Total value of a aggregation based on the calendar date you select in this case the 14 adding the DATEADD part you can select how the date column is filtered in this case I take 1 month form the date so 14 of March minus one month 14 of March.
I have made it in several so you could see the result:
February everyday as 200 in value March everyday as 300
14 * 200 = 2800
14 * 300 = 4200
Se the result below:
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks MFelix,
I understand the problem a little more now but I would like to have a KPI type of card in the dashboard with the current month unit sales (so now its sales of March but will be sales of April next month) and the last month unit sales until same day of the month we are currently in as objective in the KPI. I hope is undersatandable what I want, sorry for my english.
Thanks!
Hi!
Did you find the correct solution for your issue? can you please share it with me? 🙂
thank you!
Hi @ContabilidadBI,
In this example I have made I have linked it to a slicer if you don't make any selection and your data finish on March 14 it will give you current month on the measure. Measure are based on context and when you do a MTD it will fetch the maximum date on your table.
Just in case change the PM to
Total MTD PM = var select_date = MAX(Data[Date] ) return TOTALMTD(SUM(Data[Total]);CALCULATETABLE(DATEADD(Data[Date];-1;MONTH);Data[Date]= select_date))
Regards,
MFelix
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 |
---|---|
107 | |
97 | |
75 | |
63 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |