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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
owenkosnen
Frequent Visitor

Measure cannot be filtered by Date Slicer

Hi,

 

I have a measure that was created via "New Quick Measure" to calculate the QoQ% Change based on a calculated column (just the total of column A + B + C).
I'd like to plot these column and the QoQ% Change into a bar and line chart, and add a Date Slicer. However, it seems that the measure cannot be filtered and displayed by the chart when Date Slicer is being adjusted and causes the whole chart to show error.

[Full date period]

owenkosnen_0-1644307796117.png


[Adjusted Date period]

owenkosnen_1-1644307828360.png

As I am new to Power BI, I wonder if anyone can shed some light to what might be the solution for this. I believe it is doable to be done in Power BI, but perhaps there is a trick to make it happen...

 

Best Regards,

Owen

10 REPLIES 10
TheoC
Super User
Super User

Hi @owenkosnen 

 

You can use the following measures:

 

QTD = CALCULATE ( SUM ( Table[Amount] ) , DATESQTD ( 'Date'[Date] ) )

Last QTR = CALCULATE ( SUM ( Table[Amount] ) , DATEADD ( 'Date'[Date] , -1 , Quarter ) )

QoQ% = ( [QTD] - [Last QTR] ) / [Last QTR]

 

Ensure to change the measure [QoQ%] to percentage.

 

Hope this helps.

Theo 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

@owenkosnen sorry, I had an extra bracket at the end of the QoQ%

 

QoQ% = ( [QTD] - [Last QTR] ) / [Last QTR] 

 

 

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Yes I also noticed the extra bracket there but seems it is the issue...
I am ]curious since my base column for (Table[Amount]) is actually a calculated column, could it be the reason why it is not working ?

@owenkosnen it is likely to do with the relationship you have. Have you established a relationship between the Date table and Fact table. Have you got a Date column in both the Date table and Fact table?

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

@TheoC there is only one source table for all data so maybe we can opt out relationship setups.. (though I just learned that the best practice should be to keep Date Table separated)

@owenkosnen how are the dates presented in your table? You will need to change the 'Date'[Date] reference in the measures I recommended to your TableName and [Date] column in order for them to work, subject to you have an appropriate Date column.

 

Hope that makes sense. 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Hi Theo, 

 

Thanks a lot for your quick response!
I tried your suggestion to create these measures but not sure why I get Infinity as the value for QoQ%. I have made sure to change it to Percentage as well.
 

@owenkosnen  sorry, I had an extra bracket at the end of the QoQ%

 

 

 

QoQ% = ( [QTD] - [Last QTR] ) / [Last QTR] 

 

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

@owenkosnen , Update QoQ% like below:-

QoQ% = divide( ([QTD] - [Last QTR] ), [Last QTR] ,0)

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Hello,

I tried your formula but it is not working unfortunately.. 
I just updated my post with a screenshot for more info, the QoQ is generated with New Quick Measure but just not working with Date Slicer

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.