Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello!
I have a dataset that is looking something like this:
Server | Scanid |
Server1 | 1 |
Server2 | 2 |
Server3 | 1 |
Server1 | 3 |
Server2 | 3 |
How can I make a DAX query the only filters out the servers in the last Scanid?
In this example I would like to return:
Server | Scanid |
Server1 | 3 |
Server2 | 3 |
Hi, @Anonymous
Please check the below, whether it is what you are looking for.
ScanID Measure =
VAR lastscanidoverall =
MAXX ( ALL ( 'Table' ), 'Table'[Scanid] )
VAR currentscanid =
MAX ( 'Table'[Scanid] )
RETURN
IF (
ISFILTERED ( 'Table'[Server] ),
IF ( lastscanidoverall = currentscanid, currentscanid )
)
https://www.dropbox.com/s/093gm8gkoidowoq/anthon.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@Anonymous I call this the Complex Selector. https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/td-p/1116633
Basically, create a measure like the following and use it in the Filter pane or you could also do it as a column:
Measure Selector =
VAR __Max = MAXX(ALL('Table'),[ScanID])
VAR __Current = MAX('Table'[ScanID])
RETURN
IF(__Current = __Max,1,0)
Column Selector
VAR __Max = MAX('Table'[ScanID])
VAR __Current = [ScanID]
RETURN
IF(__Current = __Max,1,0)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |