Forum Discussion

DebbieE's avatar
DebbieE
Icon for Community Champion rankCommunity Champion
3 years ago

Creating Measures over flags in Junk Dimension (Design Question)

My data consists of flags rather than metrics and instead of adding them into the fact table I have added them into a junk dimension as per modelling guidance. 

 

I have a fact tables that are going to use a junk dimension. 

 

And I create measures e.g.

Measure 1 = COUNTAX(FILTER('Dim Metrics junk', 'Dim Metrics junk'[AtRiskFlag]=TRUE()),TRUE())
So I can count the number of true Flags
 
But because there is nothing in the central fact table it just counts everything in the dim. I dont have anything to bring through from the central fact table to make sure we only see the count against the fact table. 
 
I know the guidance is to have flags in a junk dimension but this would work if they were in the fact table. Does anyone know any work arounds on this?
 
Im absolutely completely stumped on this one to the point where Im now thinking Power BI cant work with flags in a junk Dimension

1 Reply

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

    I think I have it

     

    on track = CALCULATE(COUNT('Fact '[JunkKey]),'Dim Junk'[OntrackFlag]=TRUE()|| 'Dim Junk'[Reporting Group Description] = "Metrics")