The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello!
My data set:
'Date'[Date] - Default data table, used as report filter
Table:
Product_ID | Date_Start | ... |
2432 | 20.02.2022 | |
3522 | 21.02.2022 | |
... | ... |
Task: Count number of distinct Product which started at given date
Solved! Go to Solution.
Sounds like the entries in 'Date'[Date] aren't formatted as proper dates. Hence the conversion to a correct date by a simple mathematical operation (for example, your subtraction of 1).
Regards
Ok, so everything looked fine at first glance.
But changing date table from defined in report by:
Date = CALENDAR(DATE(1990, 01,01),DATE(2099,12,31))
to Data table generated in power query solved the issue.
Thanks for guidance.
Sounds like the entries in 'Date'[Date] aren't formatted as proper dates. Hence the conversion to a correct date by a simple mathematical operation (for example, your subtraction of 1).
Regards
Ok, so everything looked fine at first glance.
But changing date table from defined in report by:
Date = CALENDAR(DATE(1990, 01,01),DATE(2099,12,31))
to Data table generated in power query solved the issue.
Thanks for guidance.
Date = CALENDAR(DATE(1990, 01,01),DATE(2099,12,31))
and column: 'Date'[Date], data type is "Date"
Hi,
MyMeasure :=
VAR ThisDate =
MAX( 'Date'[Date] )
RETURN
CALCULATE(
DISTINCTCOUNT( 'Table'[Product_ID] ),
'Table'[Date_Start] = ThisDate
)
which is identical to:
MyMeasure :=
VAR ThisDate =
MAX( 'Date'[Date] )
RETURN
CALCULATE(
DISTINCTCOUNT( 'Table'[Product_ID] ),
FILTER(
ALL( 'Table' ),
'Table'[Date_Start] = ThisDate
)
)
Regards
I have already tried this alternative , no change. As in my post, it works with
ThisDate =
MAX( 'Date'[Date] ) - 1
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
21 | |
12 | |
10 | |
7 |