Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hey,
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.
Hi Carola,
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,
Mustafa Asiroglu
Thank you so much, you saved my life 😊😊
This looks useful for me, how can you do this for "Today", i tried but get a unexpected error .
This --> https://ibb.co/gWQHCVR
Hi @Carola13,
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.
Regards,
Yuliana Gu
Can you try max( Date) in "date" column and keep it selected and get it published.
Thanks
I tried
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? 🙂
Ok seems like you are using Direct query why dont you write MAx(date) in Sql , and get that particular column.
select.. max(date) from .. group by..
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.
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |