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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
pd4000
Frequent Visitor

Struggling to replicate mental picture of visual

Hi,

 

Having an issue creating a visual which I can picture in my mind... I will try to explain as simply as possible.

 

3 vertical columns of data Project Name (text), Rank (text and numbers), Program (text).

 

I want to have a visual or table where it goes like this

 

Rank A                Rank B                 Rank C

 

Project X            Project Y              Project Z

 

Project G          Project H               Project I

 

Want to colour coordinate the projects based on the Program (conditionally format)

 

Have tried to create a different table to do this view and have tried to concatenatex but to no avail.

 

Kind regards,

 

Priyan

1 ACCEPTED SOLUTION

Hi @pd4000

Please refer to my pbix

Create a measure (data type is number) to define color rule

Measure-color = SWITCH(MAX([por]),"red",1,"blue",2,"green",3,"grey",4)

Then select"format"->"conditional formatting", select the column [project] (in my test, i create a measure [Measure-project] to show the same value as this column), then select "background color".

6.png

5.png

 

View solution in original post

8 REPLIES 8
v-juanli-msft
Community Support
Community Support

Hi @pd4000

Assume your table is like

6.png

Create a matrix, so that to get a similar layout as you expected

Measure created

Measure-project = MAX([Project])

 

3.png

Then create a measure of "program" as number type

Measure-program = SWITCH(MAX([Program]),"A",1,"B",2,"C",3)

Then use it as a rule in the conditional formatting

5.png

 

Best Regards

Maggie

Hi Maggie,

 

Thanks for your reply.

 

Your solution definitely solves part of my problem.

 

The table is the first image and the visual is the second image.

Table StructureTable Structure

 

Required VisualRequired Visual

The issue is that I would like to have the projects displayed in a column format. The program is not really useful in this calculation/for this visual. The reason why your solution only partly works for me is that if I am using the Portfolio level to colour there is more than 1 result for the projects per portfolio and therefore, the 'max' function doesn't work.

 

Hope this makes sense and regards,

 

Priyan

 

 

Hi @pd4000

I am not clear with the rule of coloring the project?

From your "required visual", i can't associate it with the "table structure" above.

Additionaly, my formula using 'max" function doesn't mean to get the max value, it just catch each value of each row.

 

Please let me know expected result based on your example table.

 

Best Regards

maggie

Hello @v-juanli-msft

 

Hopefully, this image helps. I have placed the table of data on the left and the tabular/matrix style visual on the right...

 

Power BI Image.png

 

 

Please let me know if this doesn't help.

 

Kind regards,

 

Priyan

Hi @pd4000

Please refer to my pbix

Create a measure (data type is number) to define color rule

Measure-color = SWITCH(MAX([por]),"red",1,"blue",2,"green",3,"grey",4)

Then select"format"->"conditional formatting", select the column [project] (in my test, i create a measure [Measure-project] to show the same value as this column), then select "background color".

6.png

5.png

 

Hi @v-juanli-msft

 

This works well, however, I kind of don't want it to be associated by the 'Program' column.

 

So it would look like the table in the attached Excel. So, basically have all the projects in the ranks without relation to the program.

 

Untitled.jpg

Kind regards,

 

Priyan

Hi @pd4000

As tested, if you use matrix visual, it impossible to get this visual as you expected, when losing program in row, then the project only shows the first one by default.

 

Best Reagrds

maggie

Hi @v-juanli-msft,

 

Understandable. Thanks for the accepted solution though, much appreciated!

 

Kind regards,

 

Priyan

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.