Forum Discussion
peteru9067
Helper III
4 years agoDistinct count over a period
I have a table with Tags and Dates...... I would like to count the distinct number of times a tag appears over a time period i.e. 7 days. so if the tag appears multiple times in one day, it should on...
- 4 years ago
peteru9067 not sure if this is what you meant but if you just create this measure:
Appears = DISTINCTCOUNT('Table'[Date])
and put the IPL tag on the bar axis than you will get the distinct count of days for each one for every time period you will choose on an outside filter or slicer:
FarhanAhmed
Community Champion
4 years agoyou can try this. Your model should have Date Dimension to get this result. whatever selection you will made through the filters of your date table you will get relative results.
Distinct Tag = CALCULATE(DISTINCTCOUNT('Tag'[Date]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-7,DAY))peteru9067
Helper III
4 years agoThanks.... I dont know if I understand your measure. what is 'Tag'[Date]
- FarhanAhmed4 years ago
Community Champion
Tag[Date] is the date from your orignal table where IPL Tag and Dates column are present.
Date[Date] is the date column from your date dimension.