Forum Discussion
Selection between two dates
- 6 years ago
By VS 2017 it seems like you are refering to Visual studio, is that correct? Which version of VS you have should not matter, but you need to check the version of your SSAS installation:
to check the SSAS version go to SSMS -- connect to SSAS instance --> reports -> standard reports --> General and there would be the version for you
But perhaps more important , it does not work in direct query:
https://community.powerbi.com/t5/Desktop/SELECTEDVALUE-not-a-valid-function/td-p/270639
you can rewrite by using the hasonevalue-function
If(max(table[startdate])>min(dim[date]) && max(table[enddate])<min(dim[date]),1,0)
Note: i assumed after date slicer here.
And set this measure to 1 in table level filter.
Now this one will show only data which is with the above date condition.
Still if you have any doubt feel free to ask.
Thanks
Pravin wattamwar
I am sorry, but I don't understand.
First, what is a table level filter?
I created the IF-statement as a measure, but it cant be added to a slicer or used as a visual level filter.
Going back to my measure that uses selectedvalue, the error it gives is:
Failed to resolve name 'SELECTEDVALUE'. It is not a valid table, variable or function name.
Does this give you an idea of why it is not working? (I am working in January 2019 version of PBI for Reporting Server.)
Is selectedvalue even supported in live connection/direct query?
Thanks
- Anonymous6 years agoNot applicable
sorry tablel level filter means visual level filter.
follow the steps which i have suggested.
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.check my blog here
https://community.powerbi.com/t5/Community-Blog/Connecting-to-a-Tabular-Model-Using-Power-BI/ba-p/913784