Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Segment not working.

Hi All,   For god sake please help me. I have attached the power BI report as well, Kindly download it.   I want to show the count of users who have spent money as per the given segment but my da...
  • Anonymous's avatar
    Anonymous
    2 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])&&not(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.