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.
Hi PBI-forum users,
I'm trying to get a text output in a measure based on an IF-statement.
I know it's possible to just add an column with an if-statement like if(table[column] < 10; "Category 1"; "Category 2").
However i'm using what-if parameters in my report and they are only useable with measures and not columns.
I know I can use sumx(table, if(table[column] < 10; 1; 0).
However, I need the row context in order to give me a text output like:
sumx(table, if(table[column] < 10; "Category 1"; "Category 2") (this measure obviously does not work with sumx, but I hope you understand what I'm trying to do...
I can't think of any function on how to achieve this, does anyone on here?
Thanks in Advance!
Solved! Go to Solution.
I'm not sure I understand but this
New Col = if(table1[column] < 10, "Category 1", "Category 2")
you can implement with a measure like
Measure = if (DISTINCT(table1[column]), < 10, "Category 1", "Category 2"))
or
Measure = if (SUM(table1[column]), < 10, "Category 1", "Category 2"))
and then the exact equivalent:
New Col = [Measure]
context transition will help you behind the scenes
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
@Vogels
I am not quite sure, but to get the what you are expected with the
column = if(table[column] < 10; "Category 1"; "Category 2"),
you can create the following measure:
@Vogels
I am not quite sure, but to get the what you are expected with the
column = if(table[column] < 10; "Category 1"; "Category 2"),
you can create the following measure:
I'm not sure I understand but this
New Col = if(table1[column] < 10, "Category 1", "Category 2")
you can implement with a measure like
Measure = if (DISTINCT(table1[column]), < 10, "Category 1", "Category 2"))
or
Measure = if (SUM(table1[column]), < 10, "Category 1", "Category 2"))
and then the exact equivalent:
New Col = [Measure]
context transition will help you behind the scenes
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi @Vogels
Ok, but what operation are you trying to do with that text, if it's not the addition that SUMX provides and that is not valid in this case? Maybe CONCATENATEX( )? If not, what?
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
I need to get an text-output in the row context, so each row is categorized. However this needs to work with my whatif parameters, because my visuals need to adjust on this.
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 |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |