Forum Discussion
Filter on unique values
- 5 years ago
Hi Anonymous ,
Would you please refer to the following measure:
Measure = CALCULATE(DISTINCTCOUNT('Table'[Order]), FILTER('Table','Table'[Created week] = MAX('Table'[Created week])&& CALCULATE(MAX('Table'[Priority]),FILTER(ALLEXCEPT('Table','Table'[Order]),'Table'[Reported week] = MIN('Table'[Reported week]))) in {"high", "urgent"}))If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Anonymous , You need to have date/week table with following columns
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
or
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format
measure like
This Week = CALCULATE(Count('Table'[Order]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank]) && 'Table'[Priority] in {"urgent", "high"} ))
Created before Week = CALCULATE('Table'('Table'[Order]), FILTER(ALL('Date'),'Date'[Week Rank]<=max('Date'[Week Rank])))
Created in this week with not before
if(not(isblank([This Week])) && isblank( [Created before Week ]),1,0)
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8
Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retention/ba-p/1377458