Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!