Forum Discussion

JKG's avatar
JKG
Frequent Visitor
7 years ago
Solved

Add New Measure based on Column in Matrix visualization

I have a matrix visualization that I created in PowerBI that looks like this.  What I want to do is add a row (like the Total Row) that shows the average Hours/Pilot for the month subtotaled by the E...
  • v-jiascu-msft's avatar
    7 years ago

    Hi JKG,

     

    I created a similar demo. Please download it from the attachment. 

    The problem here is we can't add a row. But we can get the result in the Total row. Please refer to the snapshot below.

    totalIsEverage =
    IF (
        HASONEVALUE ( DimProduct[ColorName] ),
        SUM ( Sales[SalesQuantity] ),
        AVERAGEX (
            SUMMARIZE (
                Sales,
                'Calendar'[Datekey].[Year],
                'Calendar'[Datekey].[Month],
                DimProduct[BrandName],
                DimProduct[ColorName],
                "totalSales", SUM ( Sales[SalesQuantity] )
            ),
            [totalSales]
        )
    )
    

    Add-New-Measure-based-on-Column-in-Matrix-visualization

     

    Best Regards,