Forum Discussion

Sajjad_Hussain's avatar
Sajjad_Hussain
Frequent Visitor
3 years ago

DAX Measure Error

 

Hi All I have the below two different tables one is main revenue and another is wholesale amount. I have created  a measure and sum all total and its fine but when i want to explore location-wise, the total is giving me wrong value.

 

let say when i click on location 101 in first table the its automatically taking the whole sum of 2nd table. Any suggestion or help is appreciated. 

Actually I want something like if date and location are same its automatically gives me sum based on location wise.

After selecting 101 loc in first table below image 

what i want is after selecting 101 its should return me 69448.69 in total  for 101 location.

 

plz help guys. 

thank you

3 Replies

  • Sajjad_Hussain , Hope you are using a common Loc and date dimension table

     

    Power BI- DAX: When I asked you to create common tables: https://youtu.be/a2CrqCA9geM
    https://medium.com/@amitchandak/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solution-8e3eccb41bda

     

    Power BI- Power Query: When I asked you to create common tables: https://youtu.be/PqfGW6pl1Sw

     

    The information you have provided is not making the problem clear to me. Can you please explain with an example.
    If this does not help
    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
    Appreciate your Kudos.

    • Sajjad_Hussain's avatar
      Sajjad_Hussain
      Frequent Visitor

      Dear Amit thankyou for your reply let me upload my pbix file 

       

      Actually i want to sum from both tables, table 1 and table 2. 

      basically its sales data but from two different sources and i want to add them and apply mtd and ytd for it but i cannot as when i click on individual location in table 1, eg. 010 the total Card displays all the sum of location of table 2 which i want only select the 010 location sum from both tables. 

      Is there any way we can combine all in one table? like in you video you added. I went through it but cannot do it. plz look at my pbix and please let me know.

      My Onedrive link to pbix file.

      Pbix Sample File 

       

      Thankyou for your help.

  • Ceate a seperated Loc_id list as dimension table, and create relationship to both your tables.

    Then use the new dimension table for the collume  to filter both table.