Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Help with Lookupvalue

Hi All, 

 

I have a budget table where I have the monthly budget for different product groups and different account types. 

Similarly, I have a sales table where I have daily sales transactions for the same product groups and account types. 

I want to bring in my sales transactions into my budget table so I can plot sales vs. budget by month for different product groups and account types. 

I tried lookupvalue but it gives me the error "A table of multiple values was supplied where a single value was expected". 

 

Any help would be great. Ready to share my data and/or pbix file if needed. 

 

Thanks!

 

8 Replies

  • negi007's avatar
    negi007
    Community Champion

    Anonymous  Do you have date table in your dataset? Else you would need to create a date table in your dataset and then you would need to link your budget table and sales transaction table with the date table using date field. This way by selecting a month using date field from date table you would be able to view the budget and actuals at the same time. 

     

    You can create a date table using below dax syntex. Go to table data view (second icon on the left side) and then click new table and enter below dax syntex

     

    date_table = CALENDARAUTO()

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi negi007 , 

       

      I have a date table and my budget table and sales table are both linked to the date table. 

       

      It works fine when I want to plot sales vs. budget by month but if i want to drill down into product group and/or account type its doesn't return what I want. 

       

      Please see screenshot. My budget values are correct but my sales values aren't what I want when I drill down into product group and account type. 

       

      • negi007's avatar
        negi007
        Community Champion

        AnonymousYou would need to link product id of budget and transaction tables. I would suggest you to have a seperate product table with all product ID and product details. Then you would need to link product ID from product table with product ID in budget and transaction table. This would show you the correct output.