Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi All,
I am having a bit of trouble to get this right. I have a data set with dates and 2 columns Submitted and Delivered, if values for both the columns are 1, then file has been "successfully transfered" and if either is not 1 , then it gives something like "Not successful". To achieve this I created a new column in the data to check if both values are 1 or not. Now, I am creating a card based on the new column value which says "successfully transfered" or "not successful" and now based on the above condition I am trying to put a rule to colour it green when successful and red when not.
So the final result is I am looking for a card where if the file is successful to get the text in green and if not then the text should be in red.
Thanks.
Solved! Go to Solution.
Hi, @SS_1122
Thank you for your quick response, based on your description you want to show the green and red color according to the return in your card visual. Right?
Here are the steps you can refer to:
(1)This is my test data:
(2)We can create a measure to return the [Successful] of the last date. And we can put the measure on the card visual.
Last Successful = var _date = MAX('Table'[Date])
var _t = FILTER('Table','Table'[Date] =_date)
return
MAXX(_t,[Successful])
(3)We need to create a measure to configure the text color in the card visual.
Color Flag = IF([Last Successful] = "File Submission is successful","green","red")
(4)Then we can configure it in the card visual:
Then we can meet your need , the result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @SS_1122
According to your description, you want to " based on the above condition I am trying to put a rule to colour it green when successful and red when not.". Right?
Here are the steps you can refer to :
(1)This is my test data :
(2)If your want to chow color in your table , you can click "New Measure" to crrate a measure:
Measure = var _date = MAX('Table'[Date])
var _sum =SUMX( FILTER('Table','Table'[Date] = _date) , [Delivered]+[Submitted])
return
IF(_sum=2,"green", "red")
(3)Then you can configure it to the field you want:
if you want to show the whole row color , you can configure it to the all fields in your visual:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hey,
Thank you for your help, I will try and explain the context better.
So, I have a given data with 3 columns - Date, Submitted and Delivered
Date | Submitted | Delivered |
10/10/2022 | 1 | 1 |
11/10/2022 | 1 | 1 |
12/10/2022 | 1 | 1 |
13/10/2022 | 1 | 1 |
14/10/2022 | 1 | 1 |
15/10/2022 | 1 | 0 |
16/10/2022 | 1 | 0 |
17/10/2022 | 0 | 0 |
18/10/2022 | 0 | 0 |
19/10/2022 | 0 | 1 |
20/10/2022 | 0 | 1 |
21/10/2022 | 0 | 1 |
22/10/2022 | 1 | 1 |
23/10/2022 | 1 | 0 |
24/10/2022 | 1 | 0 |
25/10/2022 | 1 | 1 |
26/10/2022 | 1 | 1 |
27/10/2022 | 1 | 1 |
28/10/2022 | 1 | 1 |
29/10/2022 | 1 | 1 |
30/10/2022 | 1 | 1 |
31/10/2022 | 1 | 1 |
01/11/2022 | 1 | 0 |
02/11/2022 | 1 | 0 |
03/11/2022 | 1 | 1 |
04/11/2022 | 0 | 1 |
05/11/2022 | 1 | 1 |
06/11/2022 | 0 | 1 |
07/11/2022 | 0 | 1 |
08/11/2022 | 1 | 1 |
09/11/2022 | 1 | 1 |
Now, I create an additional column by transforming the data in power BI - to add another column whoch measure whether the files have been successfully delivered or not - to check this I write the rule as:
Successful = if(sheet1[Submitted] = 1 && sheet1[Delivered] = 1 , "File Submission is successful" , if (sheet1[Submitted] = 0 && sheet1[Delivered] = 1, "File Submission is not successful" and so on. So, now my data looks something like this
Date | Submitted | Delivered | Successful |
10/10/2022 | 1 | 1 | File Submission is successful |
11/10/2022 | 1 | 1 | File Submission is successful |
12/10/2022 | 1 | 1 | File Submission is successful |
13/10/2022 | 1 | 1 | File Submission is successful |
14/10/2022 | 1 | 1 | File Submission is successful |
15/10/2022 | 1 | 0 | File Submission is not successful |
16/10/2022 | 1 | 0 | File Submission is not successful |
17/10/2022 | 0 | 0 | File Submission is not successful |
18/10/2022 | 0 | 0 | File Submission is not successful |
19/10/2022 | 0 | 1 | File Submission is not successful |
20/10/2022 | 0 | 1 | File Submission is not successful |
21/10/2022 | 0 | 1 | File Submission is not successful |
22/10/2022 | 1 | 1 | File Submission is successful |
23/10/2022 | 1 | 0 | File Submission is not successful |
24/10/2022 | 1 | 0 | File Submission is not successful |
25/10/2022 | 1 | 1 | File Submission is successful |
26/10/2022 | 1 | 1 | File Submission is successful |
27/10/2022 | 1 | 1 | File Submission is successful |
28/10/2022 | 1 | 1 | File Submission is successful |
29/10/2022 | 1 | 1 | File Submission is successful |
30/10/2022 | 1 | 1 | File Submission is successful |
31/10/2022 | 1 | 1 | File Submission is successful |
01/11/2022 | 1 | 0 | File Submission is not successful |
02/11/2022 | 1 | 0 | File Submission is not successful |
03/11/2022 | 1 | 1 | File Submission is successful |
04/11/2022 | 0 | 1 | File Submission is not successful |
05/11/2022 | 1 | 1 | File Submission is successful |
06/11/2022 | 0 | 1 | File Submission is not successful |
07/11/2022 | 0 | 1 | File Submission is not successful |
08/11/2022 | 1 | 1 | File Submission is successful |
09/11/2022 | 1 | 1 | File Submission is successful |
Now I have to create a card based on the last entry, if the last entry says the File Submission is successful =, then it will show something like this.
My only query is how do I colour code the text with green when it says successful and red when not successful.
Hi, @SS_1122
Thank you for your quick response, based on your description you want to show the green and red color according to the return in your card visual. Right?
Here are the steps you can refer to:
(1)This is my test data:
(2)We can create a measure to return the [Successful] of the last date. And we can put the measure on the card visual.
Last Successful = var _date = MAX('Table'[Date])
var _t = FILTER('Table','Table'[Date] =_date)
return
MAXX(_t,[Successful])
(3)We need to create a measure to configure the text color in the card visual.
Color Flag = IF([Last Successful] = "File Submission is successful","green","red")
(4)Then we can configure it in the card visual:
Then we can meet your need , the result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
92 | |
75 | |
65 | |
49 | |
38 |
User | Count |
---|---|
114 | |
89 | |
80 | |
60 | |
40 |