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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.