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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Srinivas3350
Helper II
Helper II

Need help in measure

Hi I am using measure to display values in HTML content visual when I am selecting the option I am able to induvidually see the values for option i select when no option is selected i am not able to see any the data for feild below

 

Srinivas3350_3-1692615470703.pngSrinivas3350_4-1692615482836.pngSrinivas3350_5-1692615496347.pngSrinivas3350_6-1692615516601.png

i used all the 3 different measures in the variables to display those figures when i am not selecting any option i need to see those values there individually and the measure i used is 

DynamicMessage_v1 =
VAR SelectedOption = SELECTEDVALUE(DIM_ACCOUNTS_LEVEL[Accounts_Level_1])
VAR ForecastValue = [BTS(GBP-Forecast)%]
VAR BTSValue = [BTS(GBP-Forecast)]
VAR RedStyle = "style='color: red;'"
VAR BoldStyle = "style='font-weight: bold;'"
VAR Equipment = [Equipment]
VAR Supplies = [Supplies]
VAR Spares = [Spares]

RETURN
SWITCH(
SelectedOption,
"Equipment", "Europe today is at <span " & RedStyle & ">" & "<span " & BoldStyle & ">" & FORMAT(ForecastValue, "0.00%") & "</span>" & "</span> of forecast with a BTS of <span " & RedStyle & ">" & "<span " & BoldStyle & ">" & FORMAT(BTSValue, "#.##") & "</span>" & "</span> (Equipment: " & "<span " & BoldStyle & ">" & FORMAT(Equipment, "£#") & "</span>" & ")",
"Supplies", "Europe today is at <span " & RedStyle & ">" & "<span " & BoldStyle & ">" & FORMAT(ForecastValue, "0.00%") & "</span>" & "</span> of forecast with a BTS of <span " & RedStyle & ">" & "<span " & BoldStyle & ">" & FORMAT(BTSValue, "#.##") & "</span>" & "</span> (Supplies: " & "<span " & BoldStyle & ">" & FORMAT(Supplies, "£#") & "</span>" & ")",
"Spares", "Europe today is at <span " & RedStyle & ">" & "<span " & BoldStyle & ">" & FORMAT(ForecastValue, "0.00%") & "</span>" & "</span> of forecast with a BTS of <span " & RedStyle & ">" & "<span " & BoldStyle & ">" & FORMAT(BTSValue, "#.##") & "</span>" & "</span> (Spares: " & "<span " & BoldStyle & ">" & FORMAT(Spares, "£#") & "</span>" & ")",
"Europe today is at <span " & RedStyle & ">" & "<span " & BoldStyle & ">" & FORMAT(ForecastValue, "0.00%") & "</span>" & "</span> of forecast with a BTS of <span " & RedStyle & ">" & "<span " & BoldStyle & ">" & FORMAT(BTSValue, "#.##") & "</span>" & "</span> (Equipment: " & "<span " & BoldStyle & ">" & FORMAT(Equipment, "£#") & "</span>" & ", Supplies: " & "<span " & BoldStyle & ">" & FORMAT(Supplies, "£#") & "</span>" & " & Spares: " & "<span " & BoldStyle & ">" & FORMAT(Spares, "£#") & "</span>" & ")"
)

can anyone help me this is very urgrnt for me Thank you in adavnce

1 ACCEPTED SOLUTION
mlsx4
Memorable Member
Memorable Member

Hi @Srinivas3350 

 

I don't know how these measures are configured:

VAR Equipment = [Equipment]
VAR Supplies = [Supplies]
VAR Spares = [Spares]

 

But they seem to be blank if nothing is selected.

 

Maybe you should add some other formula like:

VAR EquipmentNS = CALCULATE([Equipment],DIM_ACCOUNTS_LEVEL[Accounts_Level_1]="Equipment"), 
VAR SuppliesNS =CALCULATE([Supplies],DIM_ACCOUNTS_LEVEL[Accounts_Level_1]="Supplies")
VAR SparesNS = CALCULATE([Spares],DIM_ACCOUNTS_LEVEL[Accounts_Level_1]="Spares")

 

And use these three for the last option

View solution in original post

4 REPLIES 4
mlsx4
Memorable Member
Memorable Member

Hi @Srinivas3350 

 

I don't know how these measures are configured:

VAR Equipment = [Equipment]
VAR Supplies = [Supplies]
VAR Spares = [Spares]

 

But they seem to be blank if nothing is selected.

 

Maybe you should add some other formula like:

VAR EquipmentNS = CALCULATE([Equipment],DIM_ACCOUNTS_LEVEL[Accounts_Level_1]="Equipment"), 
VAR SuppliesNS =CALCULATE([Supplies],DIM_ACCOUNTS_LEVEL[Accounts_Level_1]="Supplies")
VAR SparesNS = CALCULATE([Spares],DIM_ACCOUNTS_LEVEL[Accounts_Level_1]="Spares")

 

And use these three for the last option

VAR Equipment = [Equipment]
VAR Supplies = [Supplies]
VAR Spares = [Spares]

this 3 are measure which we are seeing data for Equipment , Spares & Supplies

as i can see the data when i select those options as i attached screenshot above

Hi @Srinivas3350 

 

Yes, but I think they are affected by a selector, isn't it? If this is the case, it won't work unless you add the three I have told you before. I mean, you need to keep yours, but include also the ones I am suggesting

Thank you so much. I really appreciate your help this is working 

Srinivas3350_0-1692617011291.png

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 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.