Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I would like to calculate a Quarterly Amount (For exmaple Q1)
My year end is on the July, so Aug,Sep,Oct will be my Q1.
I created Sum({$ <[Year Quarter]={'Q1-FY2021'}>} [Total_Amount]) in Measure
But when i try to replace 'Q1-FY2021' to Variable (vLastQ = 'Q1-FY2021') , it show no result
Thanks for you help!!🙏
Sorry, my initial post left out the closing ">}" of the set analysis. Based on your screenshot, this should work.
Sum({$ <[Year Quarter]={$(vLastQ)}>} [Total_Amount])
If your variable is defined with singles quotes, the following $-Expansion should work:
Sum({$ <[Year Quarter]={$(vLastQ)} [Total_Amount])
If your variable does not contain single quotes, your would need to supply them.
Sum({$ <[Year Quarter]={'$(vLastQ)'} [Total_Amount])
Hi GaryGiles,
I tried both Sum({$ <[Year Quarter]={$(vLastQ)} [Total_Amount]) and Sum({$ <[Year Quarter]={'$(vLastQ)'} [Total_Amount]) before but still not works.
You can refer to the following print screen that i did.
This the the formula that I use (Last Q)
Variable
The formula of Last Q (Q1-FY2021) = Sum({$ <[Year Quarter]={'Q1-FY2021'}>} [Total_Amount]). But when replace the Year Quarter to Variable, there is no result (Last Q)
Sorry, my initial post left out the closing ">}" of the set analysis. Based on your screenshot, this should work.
Sum({$ <[Year Quarter]={$(vLastQ)}>} [Total_Amount])
Hi @Jamie_Jimi, if vLastQ has Q1-FY2021 as value, the expression should be: Sum({$ <[Year Quarter]={'$(vLastQ)'}>} [Total_Amount])
I forgot to refresh before posting, the answer from @GaryGiles should work. It seems your variable name has an space, try creatinga vriable without spaces, just vLastQ (instead of vLast Q).