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
Mal_Sondh
Helper II
Helper II

Maximum Flag/Value over 2 columns

Hi,

 

If i wanted to create a filter for a chart and only wanted to include the Max Versions per Month end, how can i do this - example data as follows

 

Snap KeySnap DateMonth EndVersion
12021-02-022021-01-311
22021-02-062021-01-312
32021-03-022021-02-281
42021-04-022021-03-301
52021-04-042021-03-302
62021-04-042021-03-303

 

When i apply the filter i should only see the following:

Snap KeySnap DateMonth EndVersion
22021-02-062021-01-312
32021-03-022021-02-281
62021-04-042021-03-303

 

Any help would be appreciated.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Mal_Sondh 

You can create a measure and then put the measure in the filter .

max version =

var max_version=CALCULATE(MAX('Table'[Version]),ALLEXCEPT('Table','Table'[Month End]))

return IF(SELECTEDVALUE('Table'[Version])=max_version,1,0)

Then put the measure in the filter ,set the value is equal to 1 ,

Ailsa-msft_0-1623204006082.png

The effect is as shown :

Ailsa-msft_1-1623204006085.png

I have attached my pbix file ,you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Mal_Sondh 

You can create a measure and then put the measure in the filter .

max version =

var max_version=CALCULATE(MAX('Table'[Version]),ALLEXCEPT('Table','Table'[Month End]))

return IF(SELECTEDVALUE('Table'[Version])=max_version,1,0)

Then put the measure in the filter ,set the value is equal to 1 ,

Ailsa-msft_0-1623204006082.png

The effect is as shown :

Ailsa-msft_1-1623204006085.png

I have attached my pbix file ,you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Mal_Sondh , Create measure like these for snap key and version and use with Month, take max of date if needed

 

Version =
VAR __id = MAX ('Table'[Month ] )
VAR __date = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[Month ] = __id )
CALCULATE ( max ('Table'[End Version] ), VALUES ('Table'[Month] ),'Table'[Month] = __id,'Table'[Date] = __date )

 

Snap =
VAR __id = MAX ('Table'[Month ] )
VAR __date = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[Month ] = __id )
CALCULATE ( max ('Table'[Snap Key] ), VALUES ('Table'[Month] ),'Table'[Month] = __id,'Table'[Date] = __date )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

so the name of the table is Snapshot - are you referencing any other tables above in your query?

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.