This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Good afternoon, I need to show in a table three columns with the total of the sales depending on the month and year you choose:
For example, if I chose the year 2020 and February should show:
Dec 19 January 20 February 20
xx 1500 700 1800
yy 700 100 0
If I chose 2020 and April you should show:
February 20 March 20 April 20
xx 1800 1700 2000
yy 0 100 800
Atte,
Victor Yupa
Hi @Anonymous
in order to get achieve this behaviour, I think you need to create a new stand-alone date-table(make sure the new table is not connected to any of the other tables), and create a measure like this:
Filter Measure =
VAR _selectedMonth =
IF (
HASONEVALUE ( 'Year-Month'[YearMonthNum] );
CALCULATE ( SELECTEDVALUE ( 'Year-Month'[YearMonthNum] ) );
( year(TODAY ()) - 2010 ) * 12
+ MONTH ( TODAY () )
)
RETURN
IF (
COUNTROWS (
FILTER (
dimDate;
dimDate[YearMonthNum] >= _selectedMonth - 2
&& dimDate[YearMonthNum] <= _selectedMonth
)
) > 0;
1;
0
)
Use this measure in the filter pane, and set it to filter on equal to 1.
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 21 | |
| 21 | |
| 21 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 56 | |
| 53 | |
| 49 | |
| 26 | |
| 25 |