Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
bwelsh
Helper I
Helper I

Working with 2 time dimensions

So I have two seperate quality measures I track from week to week. 

 

Quality Measure 1 - Weekly Quality is measured Sunday - Saturday

Quality Measure 2 - Weekly Quality is measured Thursday - Wednesday

 

I have a data dimension table with a week end date column with the end date being each Sunday

 

My question is 1) How can I calculate both of these measures at the same time? 2) How can I display both of these on a visualization with the Weed End Date as the access?

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

Hi @bwelsh

 

One idea is to have a single date table (with one row per date), but have a column for each Week ending

 

Something like this calculated table :

 

Dates = ADDCOLUMNS(
            CALENDAR(DATE(2016,1,1) , TODAY()) ,
            "Weekday Name" , FORMAT([Date],"DDDD") ,
            "Week Ending Saturday" , [Date] + (7-WEEKDAY([Date])) ,
            "Week Ending Wednesday" , VAR X = 7-MOD(WEEKDAY([Date])+3,7)RETURN [DATE] + IF(X=7,0,X)
            )

 

week ending.png

 

Then just connect the Date column to your fact table and use  the Week Ending columns on your Axis


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Phil_Seamark
Employee
Employee

Hi @bwelsh

 

One idea is to have a single date table (with one row per date), but have a column for each Week ending

 

Something like this calculated table :

 

Dates = ADDCOLUMNS(
            CALENDAR(DATE(2016,1,1) , TODAY()) ,
            "Weekday Name" , FORMAT([Date],"DDDD") ,
            "Week Ending Saturday" , [Date] + (7-WEEKDAY([Date])) ,
            "Week Ending Wednesday" , VAR X = 7-MOD(WEEKDAY([Date])+3,7)RETURN [DATE] + IF(X=7,0,X)
            )

 

week ending.png

 

Then just connect the Date column to your fact table and use  the Week Ending columns on your Axis


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

This is what I was thinking, thanks for the confirmation!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.