Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
I have a date field as such : date(floor("[Date of registration]"),"DD/MM/YYYY') as [Date of registration]
I created a variable vDate with the definition of [Date of assignment] and in the values I put as dynamic values the Max(vDate) as the TODAY button, and Max(vDate-1) as YESTERDAY button.
In the pivot table I want to use , I did in the measure :
sum({<[Date of registration]={$(#vDate)}>,<[Availabity]={'available'}>} [counted] )
but all I get is "-" in my table.
Please help! 🙂
Hi, note that a sample doesn't needs to have real data o nothing from your real app, it just need data similar to the original that shows the issue.
A made a sample, in this case this expression works: Sum({<Date={'$(vDate)'}>} Value)
Note that the label of the expression in the simple table shows the expanded value: Sum({<Date={'5/4/2020'}>} Value)
A variable only stores 1 value at a time, if you click today the expression will show today date, if you clik yesterday it will show yesterday date, it only helps to test the expected format of set analysis, and check than the expanded value is working as expected.
Hi, the syntax for set analysis is not correct, it may be:
sum({<[Date of registration={$(#vDate)}, [Availabity]={'available'}>} [counted] )
Also the format can be an issue, in that case you can try with:
sum({<[Date of registration={$(=Date($(#vDate), 'DD/MM/YYYY'))}, [Availabity]={'available'}>} [counted] )
And confirm that 'available' is written exactly the same (all lowercase)
No, not working 😞
also tried to change the variable values' format to date(max([Date of registration]), 'DD/MM/YYYY') for Today
and date(max([Date of registration]-1), 'DD/MM/YYYY') and Yesterday
but still nothing 😞
One way to chek is setting the expression in a simple table without label, so the label will be the expanded expression, copy and paste from that label in a new expression to chek how it should be, once it's working adpart the $-expansion to return the expected value.
If you can upload a sample I can take a look.
Thank you for your help. I am not allowed to upload a sample.
I'm sorry, I didn't quite grasp what I need to do. Which one expression ? Can you explain to me in more detail?
Hi, note that a sample doesn't needs to have real data o nothing from your real app, it just need data similar to the original that shows the issue.
A made a sample, in this case this expression works: Sum({<Date={'$(vDate)'}>} Value)
Note that the label of the expression in the simple table shows the expanded value: Sum({<Date={'5/4/2020'}>} Value)
ok i will try it and update you with the last news 🙂
Ok, but for vDate i have two possible values, this one of Today and Yesterday with max(date)-1 and the rest of the format, these won't show?
A variable only stores 1 value at a time, if you click today the expression will show today date, if you clik yesterday it will show yesterday date, it only helps to test the expected format of set analysis, and check than the expanded value is working as expected.
Thanks so much!!!!! 🙂
Only thing i don't understand now, is how max($(#vDate)) shows 5/4/2020 and not 6/4/2020 🤔
I'm not sure of that, if I click the Today button it shows 6/4/2020: