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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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