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,
I work with a database which is updated daily (05:00 am) , but my users only want to see full weeks (Monday - Sunday) in their dashboards.
---> I do not understand what kind of a column I can create which includes a sign like 'hey, today is Thursday, so do not include me in the graphics' :).
I used to work with data, which was only updated once a week (Monday), so I created Columns like:
week_Max = IF ( data[Year_Week] = MAX ( data[Year_Week] ); "week_Max"; IF ( data[Year_Week] = MAX ( data[Year_Week-1] ); "week_Max-1" ) )
Afterwards I could create measures to compare the recent 2 weeks (calculate(sum(...); week_max="week_max")....).
But how do I create a sign which tells me that the Max(Date) is not part of a full week, so it should be ignored in the graphics?
Any ideas?
Thanks in advance
Solved! Go to Solution.
@v-chuncz-msftThanks for your answer.
I solved my problem by creating a column in my date table, which tells me how many days of the week already exist
DaysOfWeek = COUNTX ( FILTER ( 'Date_final'; EARLIER ( 'Date_final'[YearWeek] ) = 'Date_final'[YearWeek] ); 'Date_final'[YearWeek] )
Afterwards I created my max-week logic by this column (max week where DaysOfWeek = 7)
You may try to use DATEDIFF Function. The post below is for your reference.
@v-chuncz-msftThanks for your answer.
I solved my problem by creating a column in my date table, which tells me how many days of the week already exist
DaysOfWeek = COUNTX ( FILTER ( 'Date_final'; EARLIER ( 'Date_final'[YearWeek] ) = 'Date_final'[YearWeek] ); 'Date_final'[YearWeek] )
Afterwards I created my max-week logic by this column (max week where DaysOfWeek = 7)
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 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |