Forum Discussion
dynamic dimension
Thanks Anonymous for your suggestion. Much appreciated. Though the link was very helpful but it's not exactly what I wanted.
Hi Emmy66
In addition to TomMartens 's reply, I think you can use a measure to filter your data table.
Due to I don't know about your data table, I build a sample to have a test.
Sample Table:
Metric Selection table:
Measures:
Metric Selected = SELECTEDVALUE('Metric Selection'[Metric],"Country")Filter =
SWITCH(TRUE(),MAX('Table'[Category])='Metric Selection'[Metric Selected],1,0)
Build a table visual, add Filter Measure into Filter Field and set it show items when value =1.
It will show country by default.
If you select Department:
If this reply still couldn't help you solve your problem, please show me your data table and more details about your requirement.
You can download the pbix file from this link: File
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Emmy665 years agoHelper V
Hi Anonymous , thanks alot for your proposed solution. As I mentioned in my reply to TomMartens , I've recreated the table with the 1st 2 columns but stock with how to get the measures in. Any further details on how to go about it will be highly appreciated.
- Anonymous5 years agoNot applicable
Hi Emmy66
Could you show me a sample like the table you are dealing with?
I need to know your data model and your calculate logic about your measures.
This may make it easier for me to help you.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Emmy665 years agoHelper V
Thanks Anonymous for your reply. Much appreciated. I hope the information below will help. The measures I included are currently calculated from 2 tables in the model (Object & User table)
Sample measures: There are 5 other measures but the follow similar rule.
These are all based on the date slicer selection
Overdue_Projects =
VAR Selecteddate = SELECTEDVALUE(Dates[Date])
RETURN
CALCULATE(
COUNT(Object[proj_id]),
FILTER(Object, Object[target_date] < Selecteddate),
)
Active_Visitors=
VAR MinSelectedDate =DATEADD(ALLSELECTED(Dates[Date]),-3,MONTH)
VAR MaxSelectedDate = SELECTEDVALUE(Dates[Date])
RETURN
CALCULATE([Users[Id]
FILTER(User, User[last_login]>= MinSelectedDate && User[last_login]<=MaxSelectedDate)
)