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 everyone,
trying to compute a metric by hour of day, and compute the same number for 7 days ago.
My metric is :
Purchased (#) = CALCULATE(DISTINCTCOUNT(fact_purchased[id_product])
The metric for 7 days before is :
CALCULATE([Purchased (#)],
DATESINPERIOD ('dim_date'[Date],
max('dim_date'[Date])-7,-1,DAY))
I have a dim_date table and a dim_time table (hourly); data being groupped by date and start of hour in my fact tables
The screenshot i am sharing shows the data after a refresh that happened today (apr 18th) at 11 AM. The figures it is showing after 11 AM are not correct for previous week; which makes sens because there is no data point for apr 18th after 11.
Any idea of how i could display data for after 11 AM anyways ?
Thanks a lot
HI @Anonymous ,
You can consider to use date function to manually define filter date range to get correspond records:
Time Intelligence "The Hard Way" (TITHW)
Regards,
Xiaoxin Sheng
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 |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |