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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
khisla
Frequent Visitor

conditional format

I have the below visual and want to create a conditional format

If the transactio No. is Transaction No +1 of the previous row (for difference store number) to have an icon with a red circle.

For example, in my below data transaction # 145571 + #145572 would have a red circle icon while the others would be green.

My data is filtered on currency therefore not sure if that would impact the conditional formating.

 

 

khisla_0-1739095976538.png

 

Thanks in advance

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@khisla 
Not sure if you need the solution as follows:

Flag = 
VAR __PrevTrxNo = 
    MAXX(
        OFFSET( 
            -1 ,
            SUMMARIZE(ALLSELECTED(Table01) , Table01[Store No.] , Table01[Transaction No.] ),         
            ORDERBY( Table01[Transaction No.]  )
        ),
        Table01[Transaction No.]
    )
VAR __CurrTrxNo = SELECTEDVALUE(Table01[Transaction No.])
VAR __Result = INT(__PrevTrxNo + 1 = __CurrTrxNo)
RETURN
    __Result

 

Fowmy_0-1739098497267.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
khisla
Frequent Visitor

Thanks you so much.  The solution worked.

 

Fowmy
Super User
Super User

@khisla 
Not sure if you need the solution as follows:

Flag = 
VAR __PrevTrxNo = 
    MAXX(
        OFFSET( 
            -1 ,
            SUMMARIZE(ALLSELECTED(Table01) , Table01[Store No.] , Table01[Transaction No.] ),         
            ORDERBY( Table01[Transaction No.]  )
        ),
        Table01[Transaction No.]
    )
VAR __CurrTrxNo = SELECTEDVALUE(Table01[Transaction No.])
VAR __Result = INT(__PrevTrxNo + 1 = __CurrTrxNo)
RETURN
    __Result

 

Fowmy_0-1739098497267.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors