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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Vander1981
New Member

Dynamically display Revenue for CURRENT QTD in a table without dates - Measure

Hello,

 

Does someone know how to achieve the following  ?

 

Output table : Products in row vs Revenue in column.

I would like to create a measure that displays current QTD figures in a table that does not contain dates in the output table AND with possibility to filter by previous quarters as well.

 

While for YTD and Month it is fairly easy. I cannot make it for QTD.

 

Thanks a lot !

 

Ar

 

 

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@Vander1981,

Based on my test, we can take the following steps to get the result that you want.

1. Enter the data and create a time table and create relationship between the two table based on dates.

2. To get the current and previous QTD, we can use the formulas to create a measure:

Current QTD := CALCULATE(SUM(Table1[Re]), FILTER(Table1, FORMAT(Table1[Date], "q")=FORMAT(NOW(),"q")))

Previous QTD := CALCULATE(SUM(Table1[Re]), FILTER(Table1, FORMAT(DATEADD(dimtime[Date],1,QUARTER), "q")=FORMAT(NOW(),"q")))

3. Also we can create some columns for reference if necessary.

previous quarter = YEAR(DATEADD(dimtime[Date], -1,QUARTER))& "Q" & FORMAT(DATEADD(dimtime[Date], -1,QUARTER),"q")

Q = YEAR(Table1[Date]) &"Q" & FORMAT(Table1[Date], "q")

After that we can get a table like this:
1.PNG

For more information, please refer to the pbix as attached.



Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yuezhe-msft
Employee
Employee

@Vander1981,

Based on my test, we can take the following steps to get the result that you want.

1. Enter the data and create a time table and create relationship between the two table based on dates.

2. To get the current and previous QTD, we can use the formulas to create a measure:

Current QTD := CALCULATE(SUM(Table1[Re]), FILTER(Table1, FORMAT(Table1[Date], "q")=FORMAT(NOW(),"q")))

Previous QTD := CALCULATE(SUM(Table1[Re]), FILTER(Table1, FORMAT(DATEADD(dimtime[Date],1,QUARTER), "q")=FORMAT(NOW(),"q")))

3. Also we can create some columns for reference if necessary.

previous quarter = YEAR(DATEADD(dimtime[Date], -1,QUARTER))& "Q" & FORMAT(DATEADD(dimtime[Date], -1,QUARTER),"q")

Q = YEAR(Table1[Date]) &"Q" & FORMAT(Table1[Date], "q")

After that we can get a table like this:
1.PNG

For more information, please refer to the pbix as attached.



Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.