March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi
I am having below table
I wanted to create a bar graph with month on the x-axis and value on the y axis. I need to create a month name filter and whenever I select single month, it show the last three months on the bar graph
For example, If I select April, the bar grapjh shows Jan, Feb, March and April
I tried to replicate the other posts solution, but no success. Can anyone advise please?
Sample PBIX file attached here https://we.tl/t-kWAov94QkZ
Solved! Go to Solution.
Hi @bourne2000 ,
I updated your sample pbix file(see attachment), please check whether that is what you want.
1. Delete the relationship between Date and Sheet1
2. Create a measure as below to get the sum of value
Measure =
VAR _selyear =
SELECTEDVALUE ( 'Date'[Year] )
VAR _selmonth =
SELECTEDVALUE ( 'Date'[Month No] )
RETURN
CALCULATE (
SUM ( 'Sheet1'[Value] ),
FILTER (
'Sheet1',
'Sheet1'[Year] = _selyear
&& 'Sheet1'[Month] >= _selmonth - 3
&& 'Sheet1'[Month] <= _selmonth
)
)
Best Regards
Hi @bourne2000 ,
I updated your sample pbix file(see attachment), please check whether that is what you want.
1. Delete the relationship between Date and Sheet1
2. Create a measure as below to get the sum of value
Measure =
VAR _selyear =
SELECTEDVALUE ( 'Date'[Year] )
VAR _selmonth =
SELECTEDVALUE ( 'Date'[Month No] )
RETURN
CALCULATE (
SUM ( 'Sheet1'[Value] ),
FILTER (
'Sheet1',
'Sheet1'[Year] = _selyear
&& 'Sheet1'[Month] >= _selmonth - 3
&& 'Sheet1'[Month] <= _selmonth
)
)
Best Regards
Hi,
See if my solution here helps - Flex a Pivot Table to show data for x months ended a certain user defined month.
You may just import this workbook into PBI Desktop. In PBI Desktop, just go to File > Import > Power Query, PowerPivot and PowerView.
Take a look at this article that discusses what you are trying to accomplish.
https://www.sqlbi.com/articles/show-previous-6-months-of-data-from-single-slicer-selection/
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
82 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |