Forum Discussion

jfrench's avatar
jfrench
Regular Visitor
2 years ago
Solved

YoY Variance Visualization with data on unique tables

Hi, thanks in advance for help to solve this one- I keep getting stumped on how to setup relationships to make a variance work. I do not want to combine these data tables. I want them to stay separat...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi,jfrench I am glad to help you.

    Based on your description, you want to calculate the change in PROJECTS for each quarter between two years

    For example the number of projects in the first quarter of 2024 is down 67% compared to 2023

    If I understand you correctly, you can refer to my test below

    I have constructed three measures and show them on a line chart visual.
    like this:

    Here is the DAX code

    M_preProAmount = 
    CALCULATE(
    COUNT('2023_Table'[Project LOE]),FILTER(ALL('2023_Table'),'2023_Table'[Fiscal Quarter]=MAX('2023_Table'[Fiscal Quarter])))
    
    M_thisProjectAmount = 
    CALCULATE(
    COUNT('2024_Table'[Project LOE]),FILTER(ALL('2024_Table'),'2024_Table'[Fiscal Quarter]=MAX('2024_Table'[Fiscal Quarter])))
    
    M_result = 
    DIVIDE([M_thisProjectAmount]-[M_preProAmount],[M_preProAmount],0)
    

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

    Best Regards,

    Carson Jian,

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.