Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

total Sales

Hi 

 

Please help with results wich is have in pivote of attached file 

 

 

Saple data 

  • vivran22's avatar
    vivran22
    6 years ago

    Anonymous 

     

    Apart from the Calendar table, you can create two measures:

     

    Total Sales(m) = SUM(Sales[Total Sales]))

    Total Profit(m) = SUM(Profits[Profits])

     

    pbix file 

     

    Cheers!
    Vivek

    If it helps, please mark it as a solution
    Kudos would be a cherry on the top 🙂

    https://www.vivran.in/

    Connect on LinkedIn

3 Replies

  • vivran22's avatar
    vivran22
    Icon for Community Champion rankCommunity Champion

    Hello Anonymous 

     

    Based on the description provided, I would recommend following steps:

     

    Create the connection with the Sales and Profit table and Transform in Power Query

     

    Convert the CID as text:

     

    Create a reference table from Sales for CID and remove duplicates (see pbix file here). This will act as filter table in the data model:

     

     

    Create a calendar table

     

     

    Create relationship between the tables

     

    Use Matrix visual to get the desired output:

     

    Cheers!
    Vivek

    If it helps, please mark it as a solution
    Kudos would be a cherry on the top 🙂

    https://www.vivran.in/

    Connect on LinkedIn

  • Anonymous's avatar
    Anonymous
    Not applicable

    Could you please share DAX for this? If possible

     

     

    • vivran22's avatar
      vivran22
      Icon for Community Champion rankCommunity Champion

      Anonymous 

       

      Apart from the Calendar table, you can create two measures:

       

      Total Sales(m) = SUM(Sales[Total Sales]))

      Total Profit(m) = SUM(Profits[Profits])

       

      pbix file 

       

      Cheers!
      Vivek

      If it helps, please mark it as a solution
      Kudos would be a cherry on the top 🙂

      https://www.vivran.in/

      Connect on LinkedIn