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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Manuel123
Helper I
Helper I

Scenarios on FactTable

Dear Helpers,

 

I hope you can help me. I have a Fact Table like the example below:

DateScenarioFact
31.12.202111.000
31.12.202121.000
31.01.202211.000
31.01.202222.000

 

In the real table there are way more scenarios, Facts and information. I would like to provide my colleagues the opportunity to select two Cases and Compare them with each other. I tried to help me with one slicer on the Scenario Field, and one Slicer that is a distinct copy of the Scenarios and unlinked to the Fact Table. I thought it would be possible to get Scenario 1 with sum(Fact) and Scenario 2 with calculate(sum(Fact),all(Facttable),Filter(Facttable, Scenario = selectedvalue(DistinctScenarioTable))). However, this did not work. Maybe I overthink this? I guess there should be two measures (Scenario 1 Value & Scenario 2 Value). How would be the best way to achieve this?

 

Best regards

Manuel

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @Manuel123 ,

 

So you want two measures based on the selected scenrio in slicer?

measure1 is Scenario1 with sum(Fact).

 -- always return sum(Fact) of Scenario1?

measure2 is Scenario2 with calculate(sum(Fact),all(Facttable),Filter(Facttable, Scenario = selectedvalue(DistinctScenarioTable))).

--return sum(Fact) of selected scenario in slicer?

If I understand you correctly, you could refer below formulas.

measure 1 = calculate(sum('table'[fact]),filter(allselected('table'),'table'[scenario] = "scenario1"))

measure 2 = calculate(sum('table'[fact]),filter(allselected('table'),'table'[scenario] = selectedvalue('slcier'[scenario])))
Please correct me if I misunderstood your meaning.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

1 REPLY 1
v-jayw-msft
Community Support
Community Support

Hi @Manuel123 ,

 

So you want two measures based on the selected scenrio in slicer?

measure1 is Scenario1 with sum(Fact).

 -- always return sum(Fact) of Scenario1?

measure2 is Scenario2 with calculate(sum(Fact),all(Facttable),Filter(Facttable, Scenario = selectedvalue(DistinctScenarioTable))).

--return sum(Fact) of selected scenario in slicer?

If I understand you correctly, you could refer below formulas.

measure 1 = calculate(sum('table'[fact]),filter(allselected('table'),'table'[scenario] = "scenario1"))

measure 2 = calculate(sum('table'[fact]),filter(allselected('table'),'table'[scenario] = selectedvalue('slcier'[scenario])))
Please correct me if I misunderstood your meaning.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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