The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all.
How can bring the following outcome of my measure?
Basically it is var1 / var2 (var3). But not sure how to wrap it in brackets and separate with the slash.
Solved! Go to Solution.
@Anonymous
remove double ampersand (&&) and put just one (&)
Replace this
CONVERT(Yes_Count, STRING) && "/" && CONVERT(People_Count, STRING) && "("&& CONVERT(Percentage, STRING) &&")"
With this
CONVERT(Yes_Count, STRING) & "/" && CONVERT(People_Count, STRING) & "("&& CONVERT(Percentage, STRING) &")"
@Anonymous
Make sure you convert numbers to string. You can either do it in the variable or directly. See example below
var1 = CONVERT(Table[Amount],STRING)
var2 = CONVERT(Table[Amount2],STRING)
var3 = CONVERT(Table[Percent],STRING)
RETURN
var1 & " / " & var2 & " (" & var3 &")"
Or do it directly in a column. See below:
Column = CONVERT(Table[Amount],STRING) & " / " & CONVERT(Table[Amount2],STRING) & " (" & CONVERT(Table[Percent],STRING) &")"
@themistoklis , thanks
But getting an error: "can not convert value '/' of type Text to type true/false"
my measure is in previous comment.
@Anonymous
remove double ampersand (&&) and put just one (&)
Replace this
CONVERT(Yes_Count, STRING) && "/" && CONVERT(People_Count, STRING) && "("&& CONVERT(Percentage, STRING) &&")"
With this
CONVERT(Yes_Count, STRING) & "/" && CONVERT(People_Count, STRING) & "("&& CONVERT(Percentage, STRING) &")"
Nevermind, figured out the formatting part myself 🙂 thanks for help!
wow, @themistoklis , thank you! Will have to change my habbits 🙂
Would you also happen to know how to format the following variable so it would bring percentage with no decimal places ?
@Anonymous
Select the Measure from fields section.
Then on Menu on top --> Column Tools -->Format section (put 0)
Thanks, @amitchandak
But getting an error: "can not convert value '/' of type Text to type true/false"
My measure:
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
32 | |
14 | |
10 | |
10 | |
9 |