Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Help with Measure Context Issue :)

    Bronze Contributor
    Posted 5 days ago
      |   view attached

    I need help with the attached file. 

    I have a variable (DimMonthFilterCount) used in the following measures (Attribute_Total) and (Sites_in_Period) and I need to make sure it only ever displays the dist count of selected months from the date slicer. No matter how any context effects.. the result should always be the number of months selected from the slicer on the dashboard. Please fix the file if possible.. I've tried a lot of things.. and now sure what to do.



    ------------------------------
    Beau A
    Analyst
    MI
    ------------------------------

    Attachment(s)

    pbix
    TestFile-HelpNeeded.pbix   404 KB 1 version


  • 2.  RE: Help with Measure Context Issue :)

    Top Contributor
    Posted 4 days ago
    Hello,

    CALCULATE (
        IF (
            ISCROSSFILTERED ( dim_month[MonthKey] ),
            DISTINCTCOUNT ( dim_month[MonthKey] ),
            BLANK ()
        ),
        ALLSELECTED ( dim_category[Attribute] )
    )​
    ALLSELECTED or ALL should works

    ------------------------------
    Jonathan CHANAL
    Chef de Projet Digital / Data Analyst
    MCSA Power BI & Excel
    ------------------------------