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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Situation in making a measure in power bi

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.

1 ACCEPTED 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:

vkellymsft_0-1629183945522.pngvkellymsft_1-1629183963409.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

here is the sample data

Table
Col ACol B
132
2312
47
62
6575
612
2253
21
343
122
6723
7676

 

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 AMeasure (Col B=20)
10
231
40
60
651
60
221
20
341
120
671
761

 

Now if I select value of COl B in slicer as 30 then:

Col AMeasure (Col B=30)
10
230
40
60
651
60
220
20
341
120
671
761
vanessafvg
Community Champion
Community Champion

can  you provide some sample data with what you expect your result to look like, its easier to understand that way





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

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:

vkellymsft_0-1629183945522.pngvkellymsft_1-1629183963409.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.