Forum Discussion
Iam_Syed
6 months agoRegular Visitor
When values duplicate then green when unique then Red
Hi Team,
I am stuck for creating a calculation but lo luck, please help on this.
In this table has Row = Category (Text)
Column = Type (Text)
Values = sum of sales (Numeric)
I want to show this table values when duplicate then Green color if Unique the Red color.
| Category | S1 | S2 | S3 |
| Mobile | 113 | 113 | 114 |
| Laptop | 1133 | 1133 | 1134 |
| Desktop | 2211 | 1122 | 2211 |
| Furniture | 1101 | 1102 | 1101 |
Thanks
Syed
hi Iam_Syed ,
Not sure if i fully get you, supposing you have a data table like:
try to plot your expected matrix visual and apply conditional formatting for the value field background based field value with a measure like below:
Measure = VAR _cat = MAX(data[category]) VAR _type = MAX(data[type]) VAR _table = ADDCOLUMNS( SUMMARIZE( FILTER( ALL(data), data[category] = _cat && data[type] <> _type ), data[category], data[type] ), "Amt", CALCULATE(SUM(data[sales])) ) VAR _AmtList = SUMMARIZE(_table, [Amt]) VAR _result = IF([SalesAmt] IN _AmtList, "Green", "Red") RETURN _resultit works like:
hello Iam_Syed
for subtotal, just tick either column or row subtotal or both depend on your need.
Thank you.