Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
I have 2 columns both having the whole numbers in the range of 1 to 90, let's call them Col A and Col B.
I am using Col B as a slicer in Power BI.
I want to make a measure that gives me 1 if the value of Col A >= max value of Col B as selected in the slicer (as mentioned I am using Col A as slicer), else 0.
Here max value of col B refers to the max selected value of Col B.
Solved! Go to Solution.
Hi @Anonymous ,
Create a table as below:
Table 2 = GENERATESERIES(1,MAX('Table'[Col B]),1)
Then create a measure as below:
Measure =
VAR _maxvalue =
CALCULATE ( MAX ( 'Table 2'[Value] ), ALLSELECTED ( 'Table 2' ) )
RETURN
IF ( MAX ( 'Table'[Col A] ) < _maxvalue, 0, 1 )
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
here is the sample data
| Table | |
| Col A | Col B |
| 1 | 32 |
| 23 | 12 |
| 4 | 7 |
| 6 | 2 |
| 65 | 75 |
| 6 | 12 |
| 22 | 53 |
| 2 | 1 |
| 34 | 3 |
| 12 | 2 |
| 67 | 23 |
| 76 | 76 |
Now I am using Col B as a slicer and the selected value is 20.
Now I want a table with COL A and the required measure as:
| Col A | Measure (Col B=20) |
| 1 | 0 |
| 23 | 1 |
| 4 | 0 |
| 6 | 0 |
| 65 | 1 |
| 6 | 0 |
| 22 | 1 |
| 2 | 0 |
| 34 | 1 |
| 12 | 0 |
| 67 | 1 |
| 76 | 1 |
Now if I select value of COl B in slicer as 30 then:
| Col A | Measure (Col B=30) |
| 1 | 0 |
| 23 | 0 |
| 4 | 0 |
| 6 | 0 |
| 65 | 1 |
| 6 | 0 |
| 22 | 0 |
| 2 | 0 |
| 34 | 1 |
| 12 | 0 |
| 67 | 1 |
| 76 | 1 |
can you provide some sample data with what you expect your result to look like, its easier to understand that way
Proud to be a Super User!
I have sent the sample data in comment below
Hi @Anonymous ,
Create a table as below:
Table 2 = GENERATESERIES(1,MAX('Table'[Col B]),1)
Then create a measure as below:
Measure =
VAR _maxvalue =
CALCULATE ( MAX ( 'Table 2'[Value] ), ALLSELECTED ( 'Table 2' ) )
RETURN
IF ( MAX ( 'Table'[Col A] ) < _maxvalue, 0, 1 )
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 24 | |
| 22 | |
| 21 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 59 | |
| 53 | |
| 41 | |
| 31 | |
| 27 |