Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi guys, need help to fix my problem. My date is based on day start with Friday and end on Thursday
Solved! Go to Solution.
@ShibuyaSoo You can add a column with this DAX and use it as the parent.
Date Week Starts Friday 2 =
VAR Friday = WEEKDAY('Calendar'[Date], 2)
VAR weekStartDate = 'Calendar'[Date] + IF(Friday > 4, 5, -2) - Friday
RETURN MAX(weekStartDate, STARTOFMONTH('Calendar'[Date]))
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
@v-jingzhan-msft ,Yes your result same as mine, my idea is to change the parent name follow with min date of its child. For example from your result:
March : 3/29/2024 (Parent) : 29/30/31 (Child)
April : 3/29/2024 (Parent) : 1/2/3/4 (Child)
is it possible on April, Parent name follow the min date of its child?. Because I saw the date patern for example Feb to Mar they do not have issue with financial date, Parent name = min date child.
@ShibuyaSoo You can add a column with this DAX and use it as the parent.
Date Week Starts Friday 2 =
VAR Friday = WEEKDAY('Calendar'[Date], 2)
VAR weekStartDate = 'Calendar'[Date] + IF(Friday > 4, 5, -2) - Friday
RETURN MAX(weekStartDate, STARTOFMONTH('Calendar'[Date]))
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
@v-jingzhan-msft , I tried & test with the data, It's working well for me & kudos to you bro 👏👍
Hi @ShibuyaSoo
This is due to that you are using the regular Month column as the parent of "Date Week Starts Friday" column in the slicer. I can reproduce the same behavior as below. I think this is the correct result based on the current selected columns.
If you want to fix the parent date name, you need to have an additional column to have those fix names. Then use the fix column as the parent of regular date in the slicer. But if you do that, the fix week start dates for some weeks may not be their correct week start dates as the correct ones do exist in previous month. For 1/4/2024 ~ 4/4/2024, you want to fix their week start date to which date? 1/4/2024 or some other date?
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Hi @ShibuyaSoo
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
User | Count |
---|---|
92 | |
85 | |
77 | |
66 | |
62 |
User | Count |
---|---|
110 | |
95 | |
95 | |
64 | |
59 |