Forum Discussion
amandabus21
Helper V
3 years agoDAX Parameters
Hello, How can I create Parameters for Correct Date and Segmentt with the "treat as" statements in my query. I am trying to bring this DAX statement from my power BI desktop to power bi r...
ppm1
Solution Sage
3 years agoCreate your datasource and then go into the Query Designer to create your dataset, paste your DAX, create your two parameters with the button in the ribbon, and then update your DAX with those names with @.
VAR __DS0FilterTable2 =
TREATAS({@DateParam}, 'data TOSAIncident'[Correct date])
VAR __DS0FilterTable3 =
TREATAS({@CityParam}, 'def TrolleySegments'[Segment Name])
I got an error at first when I tried it a different way, but it worked when I used the designer.
Pat