Forum Discussion
Anonymous
7 years agoNot applicable
Need help modifying DAX formula for conditional formatting
Hello, I am using the following formula to get the following result. However, I need this logic: If the value of "name" at index 2 is different from the value of "name"at index 1, then change c...
- 7 years ago
Anonymous
- Please add a column for a serial number starting with 1 in your data. That can be done using Power Query >> Add Column Tab >> Index >> from 1
- Then write the following measure
Measure = SUMX( Data, (COUNTROWS( FILTER( ALL(Data), Data[Name]=EARLIER(Data[Name])&& Data[Sno]<=MAX(Data[Sno]) ) )=1 )*1 )Now use conditional formatting to highlight the font based on the measure.
Here is how the result looks like
I am hoping this is what you are expecting. You can download the Power BI file here
thanks
ChandeepChhabra
7 years agoImpactful Individual
Anonymous
- Please add a column for a serial number starting with 1 in your data. That can be done using Power Query >> Add Column Tab >> Index >> from 1
- Then write the following measure
Measure =
SUMX(
Data,
(COUNTROWS(
FILTER(
ALL(Data),
Data[Name]=EARLIER(Data[Name])&&
Data[Sno]<=MAX(Data[Sno])
)
)=1
)*1
)Now use conditional formatting to highlight the font based on the measure.
Here is how the result looks like
I am hoping this is what you are expecting. You can download the Power BI file here
thanks