Forum Discussion
How to order visuals by most recent date?
You can use formulas to control that. In case you do not want slicer to control
Sales Today =
Var _date =DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))
return
CALCULATE(COUNT('Sales'[Sales Date]),'Date'[date]=_date)
Sales Yesterday =
Var _date =DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())-1)
return
CALCULATE(COUNT('Sales'[Sales Date]),'Date'[date]=_date)
Controlled by Slicer
Selected Date =
Var _date_sel = CALCULATE(maxx('Date'[Date]),dateadd('Date'[Date],-1,day)) //change this
return
CALCULATE(COUNT('Sales'[Sales Date]),'Date'[date]=_date_sel)
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.
My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
- Anonymous6 years agoNot applicable
Thanks for the reply amitchandak . I don't think I can use the formula route since the dates the visuals would be using can be completely random in the dataset. The most recent date could be 11/26, the second most recent 11/20, the third 11/19, the fourth 10/30, etc...
Also, from looking at the slicer option, that would just be adjusting the visual to whatever date you select in the slicer?
I need a way to rank my data, but dynamically if filters are involved.
Is there a way to create a dynamic table based on slicer selections. So then a new table would be dynamically created in memory and then a ranking could be derived from there?
- Anonymous6 years agoNot applicable
HI Anonymous .
Can you please share some dummy data with the same data structure and expected result for test? It is hard to coding formula without any detail records.
How to Get Your Question Answered Quickly
Regards,Xiaoxin Sheng
- Anonymous6 years agoNot applicable
Anonymous Here is an example of my data and the result I am looking for:
So the visuals would be setup on my report, and when the user filters for Steve, the data relating to ID 203 would appear first, then in the next visual ID 302, and then ID 101. If Joe was filtered, the data relating to ID 321 would appear in the first visual, ID 1045, in the second, and ID 444 in the third visual.
I believe I need to create a dynamic rank and use it as a visual filter, however, I don't think I can use measures in a visual filter for a donut chart.
I was trying to see if there was a way to create a dynamic table based on a user's filter selection, and then have the ranking as a column on that dynamic table, but I don't believe you can pass a filter selection to a table.
I'm very stumped on this issue and I don't know if it's possible to do in Power BI?