The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I am trying to write a DAX query to get the value for a member, from a Dimension. The Dimension is called AllYears and has two members. I want to get the first or last memeber. In my senerio the Column name is CurrentDay. This value has the date or data was last run. So I will use on reports to show how current the data is. I inherited the model, so can't really change it.
This returns both values... Evaluate(values( 'AllYears'[CurrentDay])). But I only want "09/05/2019"
Any help appreciated,
Mike
This works...
EVALUATE
(LASTNONBLANK('AllYears'[CurrentDay],[CurrentDay] )
)
But Id almost rather filter out the non date values... so was trying this, but its not working.
EVALUATE
(
CALCULATE (
FIRSTNONBLANK ( 'AllYears'[CurrentDay],[CurrentDay] ),
FILTER ( ALL ( 'AllYears' ), 'AllYears'[CurrentDay] <> BLANK () )
)
)
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
10 | |
10 | |
10 | |
9 |