I've got slicer as below. I need to set the newest date in column as default value when someone open the visulization when I'll publish it.
I've tried several ideas from this forum, but none of them worked fine for me.
Thanks for your help.
New measure = MAXA(Order Date)
and after that I want to create
New column = New measure
but it shows me something like this: Function 'MAXA' is not allowed as part of calculated column DAX expressions on DirectQuery models. The same happening when it's MAX function.
Could you write more specific instruction?
That's true, I'm using Direct Query. Your idea seems good. So when I'll create new column in table using SQL and I guess it will looks like max(date) in every row, then how this will help me with keep selected the newest date in slicer? Sorry, I'm using Power BI since last month, so I don't have big knowledge of this tool.
First in sql when you write sql query
select MAx(date ) as "Date Selected".. from table 1 group by..
So you will get a new column "Date Selected ", you need not write again max in powerbi , because you will always get the max from sql.
As of now, it is not supported to specifiy and keep any default slicer selection. To filter data via slicer, users have to manually select any value first.
There is a workaround solution to set a slicer value to today or this month.
Firstly create a calculated column in date table like:
Year with This = IF(YEAR(TODAY())='Sales Date'[Year],"This Year",'Sales Date'[Year])
And use this new column in slicer as below image and selecet "This Year" value from slicer manualy at once. It will always change meaning of "this" according to column formula and report will always open with current date!
I hope it helps,