Forum Discussion
Anonymous
6 years agoNot applicable
Dynamic Date title for Drilldown
Hi guys So I have a line graph with Date along the x axis and a sum of paid invoices along the Y. Simples. The graph uses a DimDate table and I have it as a heirarchy for drilldown. I want the t...
MFelix
Super User
6 years agoHi Anonymous ,
As I refered the order is very important on the setup you are making this also if you check my formula I'm not picking up the current level for giving the title but the higher one, so for returning Month I'm checking if the quarter is only a single value.
Try the following code.
Title Paid Invoices by Treatment Period =
"PAID INVOICES BY: " &
SWITCH(
TRUE(),
DISTINCTCOUNT(DimDate[Treatment Month]) = 1, "Day",
DISTINCTCOUNT('DimDate'[Treatment Quarter]) = 1, "Month",
DISTINCTCOUNT('DimDate'[Treatment Year]) = 1, "Quarter",
"YEAR")
Anonymous
6 years agoNot applicable
For some reason just doesn't work. Maybe because my date calendar is my month and year, with no day. Ah well I can just have a hard coded title it's not the end of the world! Thanks for helping 🙂
- MFelix6 years ago
Super User
Hi Anonymous ,
Can you share a mockup file? In my tests I was struggling with the setup that why I refered that you need to do it in a specif order.