Forum Discussion

merry_jane's avatar
merry_jane
Regular Visitor
3 years ago

How to connect Target and Sales

Hi anyone can help me.

I have 2 table and dont know how to connect it at power BI.
I want have summary target and sales. When i click the slicer of month and type, i want all of it change / update link with slicer.
But it can't. Thank you for your advice.

Table1

DateCustomerTypeSalesNameSales
9/1/2023ATRONTON AVICTOR5,000

9/1/2023

BTRONTON BMAX7,000
9/1/2023CTRONTON AMAX8,000
9/2/2023BTRAILER AMAX12,000
9/3/2023BTRAILER BMAX10,000
10/5/2023ATRONTON AVICTOR8,000
10/6/2023CTRAILER AMAX15,000
10/7/2023BTRONTON AMAX5,000
10/7/2023ATRONTON BVICTOR7,000

 

 

Table2 :

TypeMonthTarget
TRONTON ASeptember 20232,425,500
TRONTON BSeptember 2023546,000
TRONTON CSeptember 2023459,900
TRAILER ASeptember 2023770,770
TRAILER BSeptember 2023435,820
TRONTON ANovember 20231,975,050
TRONTON BNovember 2023491,400
TRONTON CNovember 2023413,910
TRAILER ANovember 2023586,971
TRAILER BNovember 2023392,238

2 Replies

  • Dhairya's avatar
    Dhairya
    Icon for Solution Supplier rankSolution Supplier

    Hey merry_jane 

    You have to first create a Date Table and dimension table for type.
    then you can configure the relationship between all your tables and plot your expected data.

    DAX to create Date Table: 

    Date = CALENDARAUTO()

    Create the Following calculated column in the Date table
    Month = FORMAT('Date'[Date],"MMMM" )
    MonthNumber = FORMAT('Date'[Date], "mm")

    Configure the relationship as shown in the below image



    Now plot Type and Month from the dimension table as below

    Now you will be able to filter data with month and type


    If this helps you then please kudo and mark my solution as accepted so that others can find it quickly while facing similar issue. Thank You!