Forum Discussion

alexcatala's avatar
alexcatala
Helper IV
5 years ago
Solved

Daily Transactions

  Hi,   I am looking to extract a daily figure from the weekly figure but divide it accordingly to their daily sales. Meaning if they had better sales 1 day, that day should have higher transactio...
  • v-easonf-msft's avatar
    5 years ago

    Hi, alexcatala 

    I'm not certain that I'm understanding you correctly.

    So I make a pbix file for reference.

    Steps:

    1.use function "lookupvalue" to create a calculated column in table 'Daily Sales'

    Total Transactions = LOOKUPVALUE('Weekly figure'[Transaction],'Weekly figure'[Store],'Daily sales'[Store])

    2.Calculate the percentage of daily sales in a weekly sales

    Percentage = 
    SELECTEDVALUE ( 'Daily sales'[Sales] )
        / CALCULATE (
            SUM ( 'Daily sales'[Sales] ),
            ALLEXCEPT ( 'Daily sales', 'Daily sales'[Store] )
        )
    

    3.calculate transaction  depending on the proportion of daily sales. 

    Daily Transactions = SELECTEDVALUE('Daily sales'[Total Transactions])*[Percentage]

     

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.