Forum Discussion
Segment not working.
- Anonymous2 years ago
Hi,Anonymous
1.create relationships between tables:
2.Change the data type of all date-related columns to Date.
3. Below are the measure I've created for your needs:
Measure = CALCULATE(SUM(revenue[Net Revenue GBP]),FILTER(ALL('revenue'),Revenue[order_Status] in {"COMPLETED","confirmed","Complete"}&&'revenue'[order_date]<=MAX('revenue'[order_date])&¬(ISBLANK(revenue[ecosystem_entry_date]))&&'revenue'[order_date]>DATE(2023,10,1)&&'revenue'[order_date]<DATE(2024,3,31)))Measure 2 = CALCULATE(COUNTROWS('revenue'),FILTER(DISTINCT('revenue'), [Measure]>=MAX(Segment[Min])&&[Measure]<max(Segment[Max])))4.Here's my final result, which I hope meets your requirements.
If I have misunderstood, I hope you can provide an alternative thus enabling me to understand your needs.We can better understand the problem and help you.
Please find the attached pbix relevant to the case.Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,Anonymous
1.create relationships between tables:
2.Change the data type of all date-related columns to Date.
3. Below are the measure I've created for your needs:
Measure = CALCULATE(SUM(revenue[Net Revenue GBP]),FILTER(ALL('revenue'),Revenue[order_Status] in {"COMPLETED","confirmed","Complete"}&&'revenue'[order_date]<=MAX('revenue'[order_date])&¬(ISBLANK(revenue[ecosystem_entry_date]))&&'revenue'[order_date]>DATE(2023,10,1)&&'revenue'[order_date]<DATE(2024,3,31)))Measure 2 =
CALCULATE(COUNTROWS('revenue'),FILTER(DISTINCT('revenue'), [Measure]>=MAX(Segment[Min])&&[Measure]<max(Segment[Max])))
4.Here's my final result, which I hope meets your requirements.
If I have misunderstood, I hope you can provide an alternative thus enabling me to understand your needs.We can better understand the problem and help you.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.