Forum Discussion
table visual with multiple values
- 1 year ago
Hi,
OK please try the following.
1. Create a date table and join to the data table for filtering.
2. Add a month column to the date table using the FORMAT function. Add month as slicer.
3. Create 1st measure : (For ORACLE ONLY)
Count Per Day =Var Result = CALCULATE(COUNTX(SUMMARIZE(Sheet1, Sheet1[Date], Sheet1[OS]), 1),FILTER(Sheet1, Sheet1[Role] = "oracle"))RETURN Result4. Create 2nd measure:
MAX Value = MAXX('date', [Count Per Day])So using March and Oracle in your example gives me 2 because there are 2 dates with "Oracle" and thats the highest number. See screenshot.
Hope this helps. Let me know either way.
Hi,
OK please try the following.
1. Create a date table and join to the data table for filtering.
2. Add a month column to the date table using the FORMAT function. Add month as slicer.
3. Create 1st measure : (For ORACLE ONLY)
4. Create 2nd measure:
So using March and Oracle in your example gives me 2 because there are 2 dates with "Oracle" and thats the highest number. See screenshot.
Hope this helps. Let me know either way.
Could you please help me with the date table and join? I already have date on each data table row, is it a must to have a separate table?
- m4ni1 year agoResolver I
The date table is a must, yes. Firstly its best practice and secondly, in your example using the data table gives wrong results (I tested that), because you dont have unique values.
However if you want to know the workaround, please amend the second measure to:
MAX Value = MAXX(VALUES(Sheet1[Date]), [Count Per Day])That will give you correct numbers. Assuming the numbers are correct of course.The date table can be created using the CALENDARAUTO function in DAX.1. New table > CALENDARAUTO()2. Add date columns as needed.