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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
DanCerf
Frequent Visitor

Grid: how do I hide the total when I have only one entry and collapse

Hello!

 

I am sorry if the subject is not clear enough, I will try to explain it with pictures.

 

I have a grid with some "single entries" like this one

 

DanCerf_0-1617727070946.png

 

When I collapse the entry, I would like to see only the "Requirement summary" field filled, while the "Issue Summary" and the "Story points" ones stay blank, but I end up with this:

 

DanCerf_2-1617727230975.png

 

 

Any ideas?

 

Many thanks in advance!

 

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi @DanCerf 

 

If you want all subtotal blank, you can create these two measures and then create the visual with them.

Collapse Issue Summary = IF(HASONEFILTER('Table'[tables code]),MAX('Table'[Issue Summary]),BLANK())

Collapse Story points = IF(HASONEFILTER('Table'[tables code]),MAX('Table'[Story points]),BLANK())

 

The result looks like this:

v-cazheng-msft_0-1617848312878.png

 

If you want grid with multiple entries show the subtotal and  grid with single entry stay blank, try these Measures.

Collapse Issue Summary =

VAR num =

    CALCULATE (

        COUNT ( 'Table'[tables code] ),

        ALLEXCEPT ( 'Table', 'Table'[Requirement] )

    )

RETURN

    IF (

        HASONEFILTER ( 'Table'[tables code] )

            || num >1,

        MAX ( 'Table'[Issue Summary] ),

        BLANK ()

)



Collapse Story points =

VAR num =

    CALCULATE (

        COUNT ( 'Table'[tables code] ),

        ALLEXCEPT ( 'Table', 'Table'[Requirement] )

    )

RETURN

    IF (

        HASONEFILTER ( 'Table'[tables code] )

            || num > 1,

        SUM ( 'Table'[Story points] ),

        BLANK ()

    )

 

The result looks like this:

v-cazheng-msft_1-1617848312882.png

 

Best Regards

Caiyun Zheng

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-cazheng-msft
Community Support
Community Support

Hi @DanCerf 

 

If you want all subtotal blank, you can create these two measures and then create the visual with them.

Collapse Issue Summary = IF(HASONEFILTER('Table'[tables code]),MAX('Table'[Issue Summary]),BLANK())

Collapse Story points = IF(HASONEFILTER('Table'[tables code]),MAX('Table'[Story points]),BLANK())

 

The result looks like this:

v-cazheng-msft_0-1617848312878.png

 

If you want grid with multiple entries show the subtotal and  grid with single entry stay blank, try these Measures.

Collapse Issue Summary =

VAR num =

    CALCULATE (

        COUNT ( 'Table'[tables code] ),

        ALLEXCEPT ( 'Table', 'Table'[Requirement] )

    )

RETURN

    IF (

        HASONEFILTER ( 'Table'[tables code] )

            || num >1,

        MAX ( 'Table'[Issue Summary] ),

        BLANK ()

)



Collapse Story points =

VAR num =

    CALCULATE (

        COUNT ( 'Table'[tables code] ),

        ALLEXCEPT ( 'Table', 'Table'[Requirement] )

    )

RETURN

    IF (

        HASONEFILTER ( 'Table'[tables code] )

            || num > 1,

        SUM ( 'Table'[Story points] ),

        BLANK ()

    )

 

The result looks like this:

v-cazheng-msft_1-1617848312882.png

 

Best Regards

Caiyun Zheng

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks, it works like a charm!

DanCerf
Frequent Visitor

Hello 🙂

 

Any idea here?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.