Forum Discussion

Arjun_reddy's avatar
Arjun_reddy
Helper I
3 years ago
Solved

dax query

Hi Community team,

 

need you help on one of the dax query, please find the below snap and understand my rrequirement, write a dax query on that,

I have year, period, sales fields, want to find out the growthrate on max year available period sales, the same periods in previous year sales to growth rate

the max year(2022) having 6 periods and the same periods should check in previous year periods if periods are avaiable in previous year should computing the sales.

 

Thanks,

Arjun Reddy




  • Whenever you have the opportunity to, share the download link of the PBI file with a Calendar Table and a Period column in the Calendar Table.

8 Replies

  • Hi,

    There are 5 periods in the max year (not 6).  Also, since P3 is not avaiable in the max year, why should that be considered for the previous year?  Please revise your question and clearly show how you got 19% as the result.  Share data in a format that can be pasted in an MS Excel file.

  • don't take the table reference, just understanding purpose i have shared the snap, 
    for suppose which is i have selectedvalue as year, that year all the periods should sumup that is CY and the same periods sales should sumup in previous year that is PY, this CY,PY variables should use for growth rate

    for suppose i have selected 2022 year, In this year only 5 periods, 5 periods sales should compute and the same periods should compute the sales for finding growth rate

    Note: don;t consider the missed period, for assumption gave the snap 

     

    categoryyearPeriodsales
    chairs2021p015000
    tables2021p036000
    bulbs2022p016000
    sofa2022p044500
    chairs2022p028000
    chairs2021p066000
    chairs2021p072800
    sofa2022p054700
    bulbs2022p042000
    sofa2021p135500
    tables2021p126000
    tables2022p063400
    bulbs2021p114000
        
    • Ashish_Mathur's avatar
      Ashish_Mathur
      Super User

      Hi,

      So do you want to see the growth rate in a card visual.  You will also need to share a Calendar Table with a column there of Period.

      • Arjun_reddy's avatar
        Arjun_reddy
        Helper I

        don't have the option for sharing and  for uploading the pbix file and data file
        create a calendar manually from 01/01/2021 to till now