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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Arul
Super User
Super User

Difference between Plan/Actual in matrix but values are from same column

Hello All,

 

I have a below requirement where I need to conditionally format the cells of actual values in matrix visual while comparing with plan values. Since the plan/actual values are populating from same column I could not find the difference and add the conditinal formatting in matrix. Please refer the image attached of expected and the data structure.

Arul_0-1688620839011.png

Arul_0-1688620925474.png

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

One of ways to create a solution is to create a measure for conditionally assign the color like below.

Jihwan_Kim_0-1688622720760.png

 

Sum measure: = 
SUM(Data[Value])

 

Conditional format background measure: =
VAR _actual = [Sum measure:]
RETURN
    IF (
        SELECTEDVALUE ( Data[Plan/Actual] ) = "Actual",
        IF (
            _actual
                > CALCULATE ( [Sum measure:], Data[Plan/Actual] = "Plan" ),
            "Light Green",
            "Red"
        )
    )

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

One of ways to create a solution is to create a measure for conditionally assign the color like below.

Jihwan_Kim_0-1688622720760.png

 

Sum measure: = 
SUM(Data[Value])

 

Conditional format background measure: =
VAR _actual = [Sum measure:]
RETURN
    IF (
        SELECTEDVALUE ( Data[Plan/Actual] ) = "Actual",
        IF (
            _actual
                > CALCULATE ( [Sum measure:], Data[Plan/Actual] = "Plan" ),
            "Light Green",
            "Red"
        )
    )

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thanks @Jihwan_Kim . It's working





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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