March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hey
I had a question a while ago but didn't get resolved
basically I have data showing target values for each weke in the quarter. However when using the totalqtd function it calculates it correct for the first 12 weeks in the quarter but is blank for the 13th week. (e.g. 26/07/2018 - 01/07/2018).
Presumably this is down to it thinking the 1st is Q3 so doesn't register this week as Q2. However for us, the quarter starts on the first Monday so want to include. it. Is there a way to change this?
Probably not, but this is why I created my Time Intelligence The Hard Way quick measure for these kinds of situations:
Thanks Greg
What i do have is a separate file I uploaded containing date and quarter (with quarter when I want it to start/end each year). I feel I should be able to create a custom column/measure using this quarter but not quite figured out how.
Any chance you can post some sample data? The techniques I mentioned in my quick measures should work for this, but sample/example data allows me to get more specific about solutions. But, the main trick is to use VAR's to calculate your current quarter/month/year. Another VAR based on that to get your previous quarter/month/year. You use a SUMMARIZE to create a temp table in another VAR and from that you can use the MAXX, SUMX, AVERAGEX functions with a filter on that temp table to return the result you are looking for. But, it varies based upon the exact situation.
In the previous post (link in my original post above) there is some sample data that I made up.
Sorry, seems like we went down this road before, that's the danger of doing stuff in your spare time, sometimes I lose track of threads. See the attached PBIX. I believe what you want is this (or something close):
Measure = VAR __currentWeek = MAX([Week]) VAR __currentQuarter = MAX([Quarter]) VAR __currentYear = MAX([Year]) VAR tmpTable = FILTER(ALL(Table1),[Year] = __currentYear && [Quarter]=__currentQuarter && [Week]<=__currentWeek) RETURN SUMX(tmpTable,[Target])
I added the Index because your dates are different than the US and I was too lazy to fix them all.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
122 | |
89 | |
78 | |
67 | |
52 |
User | Count |
---|---|
199 | |
140 | |
96 | |
77 | |
68 |