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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
jacinto
Frequent Visitor

Dynamic measure based on user selection

Hi all,

 

Basically what the title says, the measure I want to use in the report depends on settings the user filter on the home page. I have two measures Spend and Indirect, however, in some cases some users might want spend as total spend which is sum of Spend and Indirect. Now whether to include indirect in spend calculation depends on the settings. Here is how a approached it. 

 

Created a table (Selector Table) with spendType column of values  Total spend and Spend. I put one page as a setting page where users select which type of spend they want. 

Here is the measure I have.

 

spend=Switch(FIRSTNONBLANK('Selector Table'[SpendType],1),

"Total spend", [Spend]+ [Indirect],
"Spend", [Spend])
 

I put spend as measures on all visuals in all pages. What I want is now spend could be different values based on the selection. However, this selection works only on the setting page, not on any other page. On other pages it shows spend as  [Spend]+ [Indirect] no matter the selection is. What am I doing wrong here? Is there any better way of implementing this. Thanks in advance. 

 

 
1 REPLY 1
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @jacinto ,

 

Try using this measure,

Dynamic measure= IF(Contains(SelectorTable(Spend Type) = "Spend", [Spend],

IF(Contains(SelectorTable(Spend Type) = "Total Spend", [Spend]+ [Indirect]))

 

Pull this measure in all your visuals on the page.

And the selectortype column in the slicer for selections.

 

Mark this as a solution if I answered your question. Kudos are always appreciated.

Thanks

 

 

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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