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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Desyn
Regular Visitor

Checking values for multiple columns

Hi,

 

I need to check a table of data to make sure that the values in all columns are all equal to 40. So in the table below, only row 1 would meet this criteria. Row 2 sums to the same total, but isn't compliant since columns 4 & 5 do not equal 40. Row 3 clearly does not meet the critera.

 

4040404040
4040403842
2525252525

 

I then need to take this a stage further and be able to specifiy the value that each row is checked against. So for example, rows 1 & 2 need to have 40 in every column, but row 3 needs to have 25 in each column. Now, in the table above, rows 1 & 3 are compliant, but row 2 still iisn't.

 

Thanks in advance for any help.

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

4 REPLIES 4
Ahmedx
Super User
Super User

if you need a measure, write it like this

Screenshot_4.png

tackytechtom
Most Valuable Professional
Most Valuable Professional

Hi @Desyn ,

 

Maybe something like this? 🙂

tackytechtom_0-1699635661913.png

 

 

Here the measure:

Measure = 
VAR _col1value = SELECTEDVALUE('Table'[Column1])
VAR _col2value = SELECTEDVALUE('Table'[Column2])
VAR _col3value = SELECTEDVALUE('Table'[Column3])
VAR _col4value = SELECTEDVALUE('Table'[Column4])
VAR _col5value = SELECTEDVALUE('Table'[Column5])
RETURN
IF ( 
    _col1value = _col2value && _col1value = _col3value && _col1value = _col4value && _col1value = _col5value, "compliant", 
    "noncompliant"
)

 

Hope this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Ahmedx
Super User
Super User

pls try this

Screenshot_2.png

That's great, thank you for your help.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.