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.
Hi All,
I want to retrieve data only from the first day the store is active
Only from the first purchase, only since then, I want to record 0 where there is no activity.
My main problem is that my database
Does not record days in the DB in which no activity is performed (does not enter them at all in FACT)
That's why I can't register 0 on such days in DAX
I try this Measure to create a flag that tells my the first activity
If I use the Show item with no data option
I get all the dates for the start of my dim date
Sorry I can't share the PBIX file
Would appreciate help
@netanel , You need to have a measure like
HasDataAfterFirst =
VAR MinDateWithTotal = CALCULATE(MIN('Fact_Transactions'[Transaction_DateKey]), filter(all('Fact_Transactions'), 'Fact_Transactions'[Store] = earlier('Fact_Transactions'[Store])))
RETURN IF(max('Dim_Date'[DateKey]) >= MinDateWithTotal, 1, 0)
Hi @amitchandak
Thanks for the quick response
first, it can't be a measure because of the earlier row context
EARLIER/EARLIEST refers to an earlier row context that doesn't exist.
So I create a new column in my Fact_transactions
look like that
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 |
---|---|
109 | |
101 | |
75 | |
63 | |
62 |
User | Count |
---|---|
143 | |
104 | |
102 | |
81 | |
66 |