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,
I am fairly new to Power Bi.
Please see below Matrix for both Male and Female and by their different Groups. How do I insert another blank column after the total column?
If this can't be done, would it be possible to have the values for female in Blue and the Male Values in Red? See table I have produced in excel.
Thank you,
Solved! Go to Solution.
@Anonymous ,
Create a measure using dax like pattern below:
Measure = SWITCH(SUM('Table'[Value]), CALCULATE(SUM('Table'[Value]), FILTER('Table', 'Table'[Gender] = "Male")), "Blue", CALCULATE(SUM('Table'[Value]), FILTER('Table', 'Table'[Gender] = "Female")), "Red")
And then open conditional formatting and select Field Value based on the Measure above:
You can also refer to the pbix file.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi I have tried that formula and it does not seem to work. Is there anything else I could try?
All the values in the table are caluclated by measures if that helps?
Thank you,
@Anonymous
@Anonymous ,
You mean the in the "value field" of the matrix visual is measure, not the aggregation of raw data, right? If so, you need to convert the measure to calculate column to make the solution I post above work.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That worked thank you!! Only problem I have now is to show the 0 value in my table, any idea on how this is done? I know in excel you could write a formula IFBLANK.
See snippet below.
Thank you once again.
@Anonymous
@Anonymous ,
Just add +0 at the end of the calculate column.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
My raw data has no blanks but when I create a measure to include everything in my matrix there are some fields which are blank, are you sure +0 will work, I don't think it will as there are no gaps.
Thank you
@Anonymous ,
You can use ISBLANK() function in power bi, please refer to:
https://docs.microsoft.com/en-us/dax/isblank-function-dax
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
Create a measure using dax like pattern below:
Measure = SWITCH(SUM('Table'[Value]), CALCULATE(SUM('Table'[Value]), FILTER('Table', 'Table'[Gender] = "Male")), "Blue", CALCULATE(SUM('Table'[Value]), FILTER('Table', 'Table'[Gender] = "Female")), "Red")
And then open conditional formatting and select Field Value based on the Measure above:
You can also refer to the pbix file.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Just with a quick view and no experiment made I would make a measure if(gender="f",1,0) and would conditional formatting,
Let me know if it worked, if not I'll take a Deeper look 😀
BR,
DR
Hi,
That did not work, it came up with an error message.
"The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."
Thank you @Anonymous
Hello,
Can you show a field selected pane so I can see how's your data is structured?
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |