Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
TimmK
Helper IV
Helper IV

Sales of Current Year and Selected Month in Each Column

I use the slicers year and month.

 

The "Actual" table shows the sales from 2019 to 2022 (as selected in the year slicer) for month January (as selected in the month slicer).

 

The "Desired Result" table shows the sales of the current year (=2022) for the selected month in the month slicer (=January) for each year selected in the year slicer (= 2019 to 2022). The result should be dynamic based on the month slicer. For example, when I select February in the month slicer, each column should show the sales of the current year (=2022) and February.

What DAX formula can I use to achieve the "Desired Result" table? I want to use it for further percentage calculation.

 

We can use the measure [Sales] for DAX.

1.PNG

1 ACCEPTED SOLUTION
arichard19
Resolver I
Resolver I

You will want to try using the "ALLSELECTED()" function to ignore the additional year columns.

-
CY & CM =

 

VAR CY = YEAR(TODAY())

Return
CALCULATE('Report Measures'[Realized Revenue], ALLSELECTED(Calender[Year]), Calender[Year] = CY)
-
arichard19_0-1657093999963.pngarichard19_1-1657094017751.png

 



View solution in original post

1 REPLY 1
arichard19
Resolver I
Resolver I

You will want to try using the "ALLSELECTED()" function to ignore the additional year columns.

-
CY & CM =

 

VAR CY = YEAR(TODAY())

Return
CALCULATE('Report Measures'[Realized Revenue], ALLSELECTED(Calender[Year]), Calender[Year] = CY)
-
arichard19_0-1657093999963.pngarichard19_1-1657094017751.png

 



Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.