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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AzarShaik-8386
Frequent Visitor

I want to create multiple conditions and show out in table.

I want to create table
Screenshot 2024-07-01 223459.png

Based on this conditions:
Screenshot 2024-07-01 223508.png

 

Measure created:

SubmissionColorMeasure =
VAR MaxPlannedDate = MAX('All (2)'[Planned Regulatory Submission Date])
VAR MaxRegulatoryDate = MAX('All (2)'[New Submitted date])
VAR MaxCurrentStatus = MAX('All (2)'[Current Status])
VAR TodayDate = TODAY()

RETURN
SWITCH(
TRUE(),
ISBLANK(MaxPlannedDate), BLANK(), // First check if Planned Regulatory Submission Date is blank
MaxRegulatoryDate <= MaxPlannedDate, "green",
MaxCurrentStatus = "prep in progress" && TodayDate < MaxPlannedDate, "light green",
MaxPlannedDate > TodayDate && ISBLANK(MaxCurrentStatus), "white",
MaxCurrentStatus = "prep in progress" && TodayDate > MaxPlannedDate, "orange",
BLANK() // Default case for any other conditions
)

 

Submission Color Measure =
SWITCH(
[Submission State Measure],
"completed", "#9dba02", // Green
"in progress", "#90EE90", // Light Green
"in Future", "#FFFFFF", // White
"Delayed", "#FFA500", // Orange
BLANK()
Can you please help me. Sample data https://drive.google.com/file/d/1NmPlYjQ1U5y9Icb38eQ6rAaYemjyT-ZT/view?usp=sharing 

2 REPLIES 2
Anonymous
Not applicable

Hi @AzarShaik-8386 

I have a question, how you to create this matrix:

vzhengdxumsft_0-1719885903631.png

What is the logic in this matrix, and which fields do you use in the matrix.

 

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

HI @Anonymous 
I wnat show this logic as background color.

logic for Submitted date:

 

1. Regulatory Submission date is less than equal to Planned Regulatory Submission Date ---> Completed

2. Current status = "Prep in progress" and todays date is less than planned Regulatory Submission Date ---> In Progress

3. Planned Regulatory Submission Date is in future and current status = blank ---> in Future

4. Current stastus = "Prep in progress" and todays date is greater than Planned Regulatory Submission Date ---> Delayed

 

Color code:
Completed = green

In Progress = light green

in Future = white

Delayed = orange
According this conditions I want create a measure for submitted date Measure and color code according this measure. I want show the color code on Regulatory Submission date. 

The above measure I provided are only giving the output of green only. 

Same way for Launch date and Approval date.Screenshot 2024-07-02 105233.png

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors