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 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/
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 |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |