Forum Discussion

Oviedityanto's avatar
Oviedityanto
Frequent Visitor
4 years ago
Solved

Compare Cumulative Count on Dimension Table Each Year vs Count Distinct Column on Fact Table by Year

Hi Experts,   This is my relationship table design : note : fact table : vDataInvoiceBUC dimension table : vMasterCalender, vMasterCustomer   The main goal is calculate the percentage of...
  • Oviedityanto's avatar
    4 years ago

    Hmmm I've found the solution.

    The solution is create new table and join between vMasterCustomer._YEAR to vDataInvoiceBUC_Customer_Count._DATEYEAR.

    Below is the table design.

     

    This is DAX for new table

    vDataInvoiceBUC_Customer_Count = SUMMARIZE(vDataInvoiceBUC,vDataInvoiceBUC[_DATEYEAR],"COUNTCUST",DISTINCTCOUNT(vDataInvoiceBUC[CUSTOMERID]))


    And below is the matrix chart