Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LAndris
Helper I
Helper I

Measure in Matrix making Column not filter correctly.

Hi All,

 

I am having an issue when filtering my matrix column headers. In the Column field I have periods that are being displayed and a filter that should show filter which types of periods are being displayed.

When I filter the periods by their type I expect the columns to only show the periods that fall within that type, which was the case when using the my amount field in my facts table. However, when using my measure that is needed to choose when to calculate a sum or average from the facts table amount field, all periods are being displayed when the period is filtered by the types of periods. I believe the issue lies somewhere in my measure but I have been unable to figure it out yet. 

 

Below I have attached some screen shots that show what is going on

 

Relationships between the facts table the period table and the periodtype table appear to be correct.

LAndris_1-1626893414471.png

 

Pbi Desktop Display

LAndris_2-1626893540637.png

Measure DAX:

LAndris_0-1626893097780.png

 

Any help is greatly appreciated.

 

Thanks, 

 

Louis

 

 

1 ACCEPTED SOLUTION

Hi @LAndris,

 

The Format Function is formatting Blanks() to an empty string, if you modify the measure to 

 

Count_And_Average_DrillThrough = 

IF(
    SelectedValue('RPT01 02_AmountType'[AmountTypeId]) <= 100 && SUM('RPT01 01_CycleTimeReport_Amount_Row'[Amount]) <> BLANK()
    ,Format(
            CALCULATE(
                        SUM('RPT01 01_CycleTimeReport_Amount_Row'[Amount])
                    )
            ,"General Number"
            )
    ,CALCULATE(
                AVERAGE('RPT01 01_CycleTimeReport_Amount_Row'[Amount])
            )
    )

you get the following result

 

richbenmintz_0-1626896484779.png

Now you weeks are not ordered properly, but that is a whole other issue!

 

Thanks,



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


View solution in original post

3 REPLIES 3
richbenmintz
Solution Sage
Solution Sage

Hi @LAndris ,

 

Could you provide the definition of Measure 2 and a sample pbix?

 

Thanks,



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Here is a link to the pbix: https://ratingdynamics-my.sharepoint.com/:u:/g/personal/landris_i4ins_com/Eaie2zb4RchFsjfB5LaLggwBq0...

 

The measure should be what was in the image above.

Hi @LAndris,

 

The Format Function is formatting Blanks() to an empty string, if you modify the measure to 

 

Count_And_Average_DrillThrough = 

IF(
    SelectedValue('RPT01 02_AmountType'[AmountTypeId]) <= 100 && SUM('RPT01 01_CycleTimeReport_Amount_Row'[Amount]) <> BLANK()
    ,Format(
            CALCULATE(
                        SUM('RPT01 01_CycleTimeReport_Amount_Row'[Amount])
                    )
            ,"General Number"
            )
    ,CALCULATE(
                AVERAGE('RPT01 01_CycleTimeReport_Amount_Row'[Amount])
            )
    )

you get the following result

 

richbenmintz_0-1626896484779.png

Now you weeks are not ordered properly, but that is a whole other issue!

 

Thanks,



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.