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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Filter newest Version of Software

Hello,

 

I am new into Power BI and not  so familiar with DAX yet.

 

For my dashboard I need to now the newest Version of the HW and the SW of a machine.

Every time when the machine runs, it is creating a row saving the HW and SW version.

In my dashboard I see latest and all old SW and HW versions of a machine.

But I just want to see the latest version of SW and HW?

 

thank you very much

 

Kind regards

Simone

 

MachineSerial NumberVersion HWVersion SW
M298019221833.217.0.12
M298019221833.217.0.1201
M298019221833.217.0.16
M407011030431.237.0.12
M407011030431.237.0.1201
M407011030431.237.0.16
M407112466520.227.0.12
M407112466520.227.0.1201
M407112466520.227.0.16
M407221223737.077.0.12
M407221223737.077.0.1201
M407221223737.077.0.16
M415722970740.217.0.12
M415722970740.217.0.1201
M4232140033 7.0.12
M4233142156 7.0.12
M4234142157 6.8.24
M4234142157 7.0.12
1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Please try the following formula:

 

Measure = 
COUNTROWS (
    FILTER (
        ALL ( 'Table' ),
        'Table'[Machine] = MAX ( 'Table'[Machine] )
            && 'Table'[Version SW] >= MAX ( 'Table'[Version SW] )
            && 'Table'[Version SW] >= MAX ( 'Table'[Version SW] )
    )
)

 

Then filter this visual with Measure = 1.

 

vkkfmsft_0-1644397738660.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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

5 REPLIES 5
Anonymous
Not applicable

@amitchandak 

Thank you very much for your fast response.

 

Unfortenately the "VAR" term always run into a syntax error for ")".
After reserch I didn't found the reason for it.

 

Kind regards

Simone

@Anonymous , Sorry, My mistake

 

try like

 

Latest Version SW =
VAR __id = MAX ('Table'[ Serial Number] )
VAR __date = CALCULATE ( MAX('Table'[Version SW] ), ALLSELECTED ('Table' ), 'Table'[Serial Number] = __id )
return
CALCULATE ( MAX ('Table'[Version SW] ), VALUES ('Table'[Serial Number] ),'Table'[Serial Number] = __id,'Table'[Version SW] = __date )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak 

no proplem, but I also have tried the RETURN command but it still doesn´t work.
Allready after the first variable I get the syntax error:

Latest Calypso Version = 

VAR __id = MAX(LogMerge[Serial Number])

 

-> Wrong Syntax for ")".(DAX(VAR __id = MAX(LogMerge[Serial Number]))).

 

The same when I use "1" instead of "MAX(LogMerge[Serial Number])".

Whe I remove both  "__" from "__id" i get the Syntax error

Wrong Syntax for "id".(DAX(VAR id = 1)).

Hi @Anonymous ,

 

Please try the following formula:

 

Measure = 
COUNTROWS (
    FILTER (
        ALL ( 'Table' ),
        'Table'[Machine] = MAX ( 'Table'[Machine] )
            && 'Table'[Version SW] >= MAX ( 'Table'[Version SW] )
            && 'Table'[Version SW] >= MAX ( 'Table'[Version SW] )
    )
)

 

Then filter this visual with Measure = 1.

 

vkkfmsft_0-1644397738660.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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

@Anonymous , You can try a measure like this

 

Latest Version SW =
VAR __id = MAX ('Table'[ Serial Number] )
VAR __date = CALCULATE ( MAX('Table'[Version SW] ), ALLSELECTED ('Table' ), 'Table'[Serial Number] = __id )
CALCULATE ( MAX ('Table'[Version SW] ), VALUES ('Table'[Serial Number] ),'Table'[Serial Number] = __id,'Table'[Version SW] = __date )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.