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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Aase
New Member

Measure - Switch between two columns based on slicer selection

Hi guys.

 

I am currently trying to create a Forecast report for our management.

 

Basically they would like to be able see either Budget- or Realised numbers, based a slicer selection.

Example: They want to be able to select "May, 2023" in a slicer and then see realised numbers from Startdate to May 31st and budget numbers from June 1st to Enddate.

 

I am really struggling in creating a meassue that can do this.

I am using DirectQuery mode, so I am not able to create calculated tables or coloums.

 

Any help?

 

Coloums:

Real: 'Finance'[Finance Amount]

Budget: 'Finance'[Finance Budget]

Calendar date: 'Calendar'[Calendar Date]

Calendar month: 'Calendar'[MonthName]

 

Aase_1-1687855094910.png

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Aase 

 

You can try the following methods.
Sample data:

vzhangti_0-1688020987742.png

Measure = IF(SELECTEDVALUE('Calendar'[Calendar date])<SELECTEDVALUE(Finance[Date]),SUM(Finance[Finance Budget]),SUM(Finance[Finance Amount]))

vzhangti_1-1688021016400.png

Calendar date and Date do not establish a relationship. Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Aase 

 

You can try the following methods.
Sample data:

vzhangti_0-1688020987742.png

Measure = IF(SELECTEDVALUE('Calendar'[Calendar date])<SELECTEDVALUE(Finance[Date]),SUM(Finance[Finance Budget]),SUM(Finance[Finance Amount]))

vzhangti_1-1688021016400.png

Calendar date and Date do not establish a relationship. Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Aase
New Member

Anybody?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.