Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hey,
Had to share this as i've been trying to figure it out for a week now. Finaly got it.
So the intention of the below is to add a column in that defines if the row is between the start data and end date, adding a "Yes/No" where true or false. It then filters the table on "Yes" and counts the unique values in a specific coulmn.
Where i have used this is to count the tickets raised last month and then compare to the tickets raised the previous month to show a specific increase or decrease in ticket numbers.
This took me ages to figure out, hopefully helps someone else!
Unique Count = VAR StartDate = EOMONTH(TODAY(),-2)+1 VAR EndDate = EOMONTH(TODAY(),-1) RETURN CALCULATE( DISTINCTCOUNT(Table1[Refference]), Filter( ADDCOLUMNS( Table1, "Last Month", IF(Table1[CLOSE_TIME_Month_Year] >= StartDate && Table1[Table1] <= EndDate, "Yes", "No")),[Last Month] = "Yes"))
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
9 | |
7 |