Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to filter my data in the load script or using set expression . I do not want to use a filter chart. I have a dimension [Customer Satisfaction Rating Date]. I need to load only yesterday's rating using set expression or in the load script . Thanks for your suggestions.
You can't use set in load scripts, but you can use where clauses when reading your data. Try something like this.
LOAD Date, Dimension, Value
FROM source
WHERE Date = today()-1
;
Thanks for the suggestion but its going to limit the data for the whole app but what I wish to do is limit for one chart or sheet in the app.
Then use a set expression like this. Assuming you are using avg([Customer Satisfaction Rating]) as core calculation. Also assuming that your [Customer Satisfaction Rating Date] is formated as your default date format.
=avg({<[Customer Satisfaction Rating Date] = {'$(=dayname(today(),-1))'} >}[Customer Satisfaction Rating])
Thanks Vegar but this is a straight table. I do not wish to use aggregation. I just need the table to show only previous days ratings and Monday's rating should show Friday's rating as previous day. Below is how my table looks like. Thanks
OK, no aggregation. What about using only()? It will return null() if you have more than one value in your line combination.
=ONLY({<[Customer Satisfaction Rating Date] = {'$(=dayname(today(),-1))'} >}[Customer Satisfaction Rating])
If the suggestion is not meeting your needs I still might missunderstand you, then please explain again. Maybe you could provide an inline or csv sample to help us understand your issue?