Showing results for 
Search instead for 
Did you mean: 
Responsive Resident
Responsive Resident

Using filter with rounded primary key



I am fine tuning conditional formatting measures for a matrix visual.   The financial statement layout table has a primary key - which is  basically a sort order, including blank rows. 

In my "test" measure - I would like to return the result where the "rounded" primary key is equal to the PK measure.   In the example below - the PKmeasure grouped in red should return the result in blue.

For example the desired result for PK row 310298.999 would be $108,689.69 (as displayed in row 310299)


Below is my test measure.   I have tried various combinations of the All/Values on the "Financial_Statement+Layout" table

Test = 

VAR RoundPK = round([PKmeasure],0)
VAR RowValue =
    CALCULATE([FinancialReport SubTotals],


The PKmeasure is basically a row index on the Financial_Statement_Layout' table

Again, all this is to help in my conditional formatting of a matrix financial statement.  The actual financial statement values are working as expected.

Thanks to the great community support!



Super User
Super User

@Dellis81 , Not very clear. You can create a color measure and and use that using field value option



Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")


Color Year = if(FIRSTNONBLANK('Table'[Year],2014)



How to do conditional formatting by measure and apply it on pie?


Power BI Features || Datamarts: || Field Parameters :
Time Intelligence Decoded :
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors