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 a data set with Month, Country, Total Sales, Quarter
My quarter is customised one. Dec - Feb (Qtr1), Mar - May(Q2), Jun - Aug (Q3), Sep - Nov (Q4).
I need to show total sales for last 4 quarter based on the selectde month in a matrix table.
For example if i select May-2023 in the slicer then it show show as below
May-2023 belong to Q2-23 and the last 4 Quarter.
Basically what i need is that Quarter name in the Matrix table show change based on the month that i select in the slicer.
And we are setting the slicer to Singe select.
Please help me to solve this.
Hi,
What if you select a month which falls in between a quater such as January. Then do you want to compare 2 months of the current quarter with all 3 months of the previous 3 quarters?
Share data in a fomat that can be pasted in an MS Excel file.
Hi @unnijoy ,
I created some data:
Here are the steps you can follow:
1. Create calculated column.
Table 2 =
DISTINCT('Table'[year_month])
2. Create measure.
Measure =
var _select=SELECTEDVALUE('Table 2'[year_month])
var _max=MAXX(FILTER(ALL('Table'),'Table'[year_month]=_select),[Quarter_Month])
var _maxdate=MAXX(FILTER(ALL('Table'),'Table'[Quarter_Month]=_max),[Date])
var _last12=EOMONTH(_maxdate,-12)+1
return
IF(
MAX( 'Table'[Date]) >= _last12 && MAX('Table'[Date]) <= _maxdate,
SUMX(
FILTER(ALL('Table'), 'Table'[Country]=MAX('Table'[Country])&&'Table'[Quarter_Month]=MAX('Table'[Quarter_Month])),[Value]),BLANK())
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Anonymous ,
The above measure is helping me to solve ma Qtr display. But when i try to show the sales for that selected month its is not wokring. how can i fix that. I mean as per the above set up when i set May-2023 it should show the above table and on the other side i need to show country wise sales for that selected month.
the how can i show that.
I have a calende table and country table seperatly. and am taking date from caleneder table and Country from Country table.
hi @Anonymous can you pls help me with the above
could you share your pbix-file? Or create an example file which reproduces your issue?
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 |
---|---|
84 | |
72 | |
68 | |
41 | |
35 |
User | Count |
---|---|
108 | |
56 | |
52 | |
48 | |
41 |