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.
New to Power bi and need some help...
I got a measure that I only want to show if another column only contains one value and that value is not null or not like “String ABC”.
I’ve figured out how to show when it’s only one value:
New Column = IF(HASONEVALUE(ADServers[OperatingSystem]);"LastLogon: " & VALUES(ADServers[LastLogonDate]);"")
The problem is that now it can return just “LastLogon: “. I would like it to return empty (“”).
Solved! Go to Solution.
Hey,
maybe this DAX creates the measure you are looking for:
Measure = IF( HASONEVALUE(Table1[a column]) , var theSelectedValue = SELECTEDVALUE(Table1[a column], "") return IF( OR(ISBLANK(theSelectedValue), theSelectedValue = "String ABC") , "the wrong values are selected" -- replace with empty string , theSelectedValue ) ,"nothing is selected single value selected" -- replace with empty string )
Hopefully this provides what you are looking for.
Regards,
Tom
Hey,
maybe this DAX creates the measure you are looking for:
Measure = IF( HASONEVALUE(Table1[a column]) , var theSelectedValue = SELECTEDVALUE(Table1[a column], "") return IF( OR(ISBLANK(theSelectedValue), theSelectedValue = "String ABC") , "the wrong values are selected" -- replace with empty string , theSelectedValue ) ,"nothing is selected single value selected" -- replace with empty string )
Hopefully this provides what you are looking for.
Regards,
Tom
That looks promising TomMartens! There is one problem, though…
Now my measure looks like this:
HiddenPRTGSensors_Uptime = IF(
HASONEVALUE(PRTGDevices[Active])
; var theSelectedValue = FORMAT(AVERAGEX(PRTGSensors; PRTGSensors[Uptime]); "0.00")
return
IF(
OR(ISBLANK(theSelectedValue); theSelectedValue = "NA")
; "" -- replace with empty string
; "Uptime: " & theSelectedValue & "%"
)
;"" -- replace with empty string
)
When PRTGDevices[Active] = NA and PRTGSensors[Uptime] = Null it returns “Uptime %”
FYI, PRTGSensors[Uptime] may contain null, one or more values.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |