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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.