Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have an existing table 'Calendar' that has years and months in it like below and is an existing Dimension table :
'Calendar'[Year] 'Calendar'[Month]
2024 1
2024 2
2024 3
etc etc
Assume the Year is set to be 2024 using a slicer on the page using 'Calendar'[Year] value.
Assume the Month is set to be 3 using a slicer on the page using 'Calendar'[Month] value.
I want to choose a month value of say March ( i.e. month = 3 ) pass it from the slicer to another measure ( I assume ) and then subtract 1 from that measure value to get the month of the previous month value ( i.e. month =2 ) :
Month_Now = 3
Month_Before = Month_Now -1
This is so i can display 2 graphs side by side , one using Month_Now as its month dimension, the other using Month_Before as its month dimension.
So if create a table visual then drag in the measure and dimension it looks like this :
[Measure] [Dimension]
[Sales_Volume] [Month]
I cant share any files due to company policy unfortunately.
Any help appreciated. Thank you.
Solved! Go to Solution.
Hi @wokka,
Thank you for reaching out to the Microsoft Fabric Community Forum.
I have reproduced your scenario in Power BI Desktop and achieved the expected output as per your requirements.
To help you further, I’m attaching the .pbix file used for this reproduction. You can open it in Power BI Desktop and review how the DAX measures and slicer interactions are configured.
Output:
Thank you, @ryan_mayu for sharing your valuable insights.
If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.
Hi @wokka,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @wokka,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @wokka,
Thank you for reaching out to the Microsoft Fabric Community Forum.
I have reproduced your scenario in Power BI Desktop and achieved the expected output as per your requirements.
To help you further, I’m attaching the .pbix file used for this reproduction. You can open it in Power BI Desktop and review how the DAX measures and slicer interactions are configured.
Output:
Thank you, @ryan_mayu for sharing your valuable insights.
If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.
if you have the calendar table, build the relationship between your calendar table and fact table.
Then you can use DATEADD funtion to get last month's value
https://learn.microsoft.com/en-us/dax/dateadd-function-dax?wt.mc_id=DP-MVP-5004616
pls see the attachment below
Proud to be a Super User!
Hello@wokka
Can you share a demo data file and the Measure DAX you're using on the visual for better understanding of what's your requirement.
Thanks & regards...
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
75 | |
54 | |
38 | |
31 |
User | Count |
---|---|
99 | |
56 | |
50 | |
42 | |
40 |