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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Line values is not correct with the if dax from slicer value

Could someone help why the line value function is not working with the selectedvalue in the slicer. 

Have a slicer Fund Type with the options below. Using a card with DAX 

Select Fund Type = selectedvalue('Fund Type'[Fund Type],"NF") is displaying correctly and the Avg card is display correctly.
However assigning the Avg to the line is always evaluating to 20
 
Avg = if(selectedvalue('Fund Type'[Fund Type],"NF") = "NF",50000,200)
This is a snapshot when no  Fund Type Industry is selected and the Avg card is showing 50K but the Avg in the chart is showing 200 . It is always showing 200 in the chart irregardless of the value in the Avg card. 
chinxenia_0-1645695323362.png

 

1 ACCEPTED SOLUTION
Russell-PBI
Resolver II
Resolver II

Hi @Anonymous, you have Fund Type as your legend, which might be stopping your measure from evaluating as TRUE.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous 

I am so glad to hear that you have solved your problem , please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards

Community Support Team _ Ailsa Tao

Anonymous
Not applicable

It did not work unless the column series Fund Type is remove. Found a way around it where the slicer is at the Fund Type table ( containing a list of distinct values) and the coumn series is at the table row level. Thank you so much for your help

Anonymous
Not applicable

Needed to have column series of fund type and need to calculate the average in the line depending on the fund type selected. If none is selected then it is average of all fund types. Hope that clarify the context on the goal

Hi @Anonymous, does this work?:

 

Avg = 
IF(
     CALCULATE(
          DISTINCTCOUNT('Fund Type'[Fund Type])
     ,    ALLSELECTED('Fund Type'[Fund Type])
     ) > 1
,    50000
,    200
)

 

Anonymous
Not applicable

Needed the fund type in the column series to depict the different colour of the fund type. Is there a way to based only on selected value.

Russell-PBI
Resolver II
Resolver II

Hi @Anonymous, you have Fund Type as your legend, which might be stopping your measure from evaluating as TRUE.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.