Forum Discussion

prashantg364's avatar
prashantg364
Icon for Helper II rankHelper II
3 years ago

DAX Measure

I am having data as per the below table.

 

I want to calculate distinct cluster counts against each KPI in each band.

like

Measure 1- Distinct cluster count against each KPI in 700 band

Measure 2 - Distinct cluster count against each KPI in 3500 band

Measure 3 - Distinct cluster count against each KPI in both 3500 & 700 band as one 

 

Pls help me with measure.

 

CircleClusterBand17_KPIs
BRBR-ARRH-000170012
BRBR-ARRH-0001350015
BRBR-ARRH-000270015
BRBR-ARRH-0002350015
BRBR-BGLP-000470015
BRBR-BGLP-0004350014
BRBR-ARRE-000170015
BRBR-ARRE-0001350015
BRBR-ARRH-001070015
BRBR-BGLP-0013350010
BRBR-BGLP-001470015
BRBR-BGLP-0004350016

2 Replies

  • some_bih's avatar
    some_bih
    Icon for Community Champion rankCommunity Champion

    Hi prashantg364  please try  measures below
    Did I answer your question? Mark my post as a solution! Kudos Appreciated!

     

    DistinctClusterCount 700 =
    CALCULATE(
    DISTINCTCOUNT(<Your table name>[Cluster]),
    <Your table name>[Band] = 700
    )

    DistinctClusterCount 3500 =
    CALCULATE(
    DISTINCTCOUNT(<Your table name>[Cluster]),
    <Your table name>[Band] = 3500
    )
    DistinctClusterCount BothBands =
    VAR _Clusters_700 = CALCULATETABLE(
    VALUES(<Your table name>[Cluster]),
    <Your table name>[Band] = 700
    )
    VAR _Clusters_3500 = CALCULATETABLE(
    VALUES(<Your table name>[Cluster]),
    <Your table name>[Band] = 3500
    )
    VAR Clusters_BothBands = UNION(_Clusters_700, _Clusters_3500)
    RETURN
    COUNTROWS(Clusters_BothBands)

    • prashantg364's avatar
      prashantg364
      Icon for Helper II rankHelper II

      Not working,

      while calculating unique cluster both bands data is resulting, not the unique cluster count passed in both bands.