The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi All,
I need to present data in form of curr month -1 , curr month and curr month +1
Below is the dataset containing sales of prev month curr month and curr+1 month (predicted)
I want the data in to represent in the below pic in a table format in powerbi
Can someone help me with dax of curr month -1 , curr month and curr month +1 .
Thanks
Shreyd22
Hi mlsx4,
Thankyou for your response . But the data contains data for past 3 years and I only want to show data for curr month-1, curr month and curr month+1. It has to be dynamic . Can you kindly help me with that please.
Appricate your efforts.
Thanks & Regards
Shrey
Hi @sd22
You can create an Offset column which does this:
Offset =
var currentMonth= MONTH(TODAY())
return IF(MONTH(MyTable[Date])=currentMonth, 1 , IF(MONTH(MyTable[Date])=(currentMonth-1),1, IF(MONTH(MyTable[Date])=(currentMonth+1),1,0)))
And then put a filter in the pane for your graph <Offset=1>
Hi @sd22
If your data is as you have put, then you only need to use a matrix to visually see it as you need:
1) Put in rows: Item
2) Put in columns: Month
3) Put in values: Quantity
Btw, you can disable totals
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
102 | |
83 | |
63 | |
56 |
User | Count |
---|---|
254 | |
119 | |
115 | |
100 | |
76 |