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 need to calculate the change in bruttoprice in this month compared to last month by each productnumber. The only way I can think of to do that is by adding a column in my table that shows previous month bruttoprice next to this months bruttoprice.
My list shows all productnumbers per month, so that several month data are in the same table.
I have tried to add a column with
I hope this makes sense
I appreciate all help!
Kind regards Anna
Solved! Go to Solution.
Hi @Anonymous ,
I have taken a data sample for example:
According to my understanding, since December has Product A,B, so you want to get the A+B = 6+7=13 of November, and do not Product C,right ? So, in summary the output should should be:
December --> A+B 6+7=13
November --> A+B+C=3+4+5=12
October --> A+B=1+2=3
If so,please try:
Measure =
var _t=SUMMARIZE(FILTER(ALL(XAL_Intego34456),YEAR([Date])=YEAR(MAX('XAL_Intego34456'[Date])) && MONTH([Date])=MONTH(MAX('XAL_Intego34456'[Date]))),[Productnumber])
return SUMX(FILTER(ALL('XAL_Intego34456'),YEAR([Date])=YEAR(MAX('XAL_Intego34456'[Date])) && MONTH([Date])=MONTH(MAX('XAL_Intego34456'[Date]))-1 && [Productnumber] in _t),[Bruttopris])
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I have taken a data sample for example:
According to my understanding, since December has Product A,B, so you want to get the A+B = 6+7=13 of November, and do not Product C,right ? So, in summary the output should should be:
December --> A+B 6+7=13
November --> A+B+C=3+4+5=12
October --> A+B=1+2=3
If so,please try:
Measure =
var _t=SUMMARIZE(FILTER(ALL(XAL_Intego34456),YEAR([Date])=YEAR(MAX('XAL_Intego34456'[Date])) && MONTH([Date])=MONTH(MAX('XAL_Intego34456'[Date]))),[Productnumber])
return SUMX(FILTER(ALL('XAL_Intego34456'),YEAR([Date])=YEAR(MAX('XAL_Intego34456'[Date])) && MONTH([Date])=MONTH(MAX('XAL_Intego34456'[Date]))-1 && [Productnumber] in _t),[Bruttopris])
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous try this
Prev month bruttopris = CALCULATE(sum(XAL_Intego34456[Bruttopris]),PREVIOUSMONTH('Date'[Date]))
* DIVIDE ( um(XAL_Intego34456[Bruttopris]), um(XAL_Intego34456[Bruttopris]) )
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi,
I'm sorry but the "um" part doesn't work - what is this supposed to do?
Hello - here is a great resources with examples for standard time intelligence measures, including current and previous month.
@Anonymous you should add this as a measure, not column.
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi,
The issue is that when I add it as a measure, I write
You will need to use separate measures - also made sure you have the proper tables and relationships in your model:
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |