Forum Discussion
Two slicer on same column
Hi Anonymous,
It can be done as well. See a screenshot and details how to achieve that below:
month filter
1. Create a calculated table using a formula:
MonthFilter1 = DISTINCT(VALUES(Table1[Month]))
where
- Table1 is your table name
- [Month] is your column of table Table1 to be used as a filter
- MonthFilter1 is your name for this calculated table, can be free text
Some examples of what is a calculated table and how to create it - https://www.youtube.com/watch?v=aKX1E3krl4I
2. Add a calculated measure to the table MonthFilter1:
MonthFilter1 Value = SELECTEDVALUE(MonthFilter1[Month])
Examples - https://www.youtube.com/watch?v=yn2bXVQJLx8
3. Create a second calculated table MonthFilter2 and measure MonthFilter2 Value in it (replace all 1 digit with 2 in formulas, except table Table1 name)
4. Create a calculated measure in Table1:
SalesMonth1 = SUMX(FILTER(Table1,Table1[Month]=MonthFilter1[MonthFilter1 Value]),Table1[Sales 2017])
Where
- SalesMonth1 is a name of your measure
- Table1 is a name of your main table
- MonthFilter1 is a name of a first calculated table
- [MonthFilter1 Value] is a name of a measure from a table MonthFilter1
- [Sales 2017] is a name of your numeric field which you want to compare for different filters
5. Create a similar measure SalesMonth2 in the same table Table1 (replace all 1 digit with 2 in formulas, except table Table1 name)
Regards,
Ruslan
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
Hi zoloturu ,
I'm trying something similar with data ranges instead of month and I don't get any results in the output measure. What could I be doing wrong?
Here are my formulas:
First table: LHS DateRange = CALCULATETABLE(VALUES('BilledRevenue'[EFF_START_DATE]))
Second Table RHS DateRange = CALCULATETABLE(VALUES('BilledRevenue'[EFF_START_DATE]))
First Measure: LHS Value = SELECTEDVALUE('LHS DateRange'[EFF_START_DATE].[Date])
Second Measure RHS Value = SELECTEDVALUE('RHS DateRange'[EFF_START_DATE].[Date])
Output1 Measure: CustomLHS = sumx(FILTER('BilledRevenue','BilledRevenue'[EFF_START_DATE].[Date]='LHS DateRange'[LHS Value]),'BilledRevenue'[Revenue])
Output2 Measure: CustomRHS = sumx(FILTER('BilledRevenue','BilledRevenue'[EFF_START_DATE].[Date]='RHS DateRange'[RHS Value]),'BilledRevenue'[Revenue])
I have created two slicers on LHS DateRange and RHS DateRange tables. No matter if I select a single date or a range of dates or multiple dates from the date slicers, I don't get any values in the CustomLHS or CustomRHS measures.