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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
mohan_g_das1986
Helper III
Helper III

How show difference in Distinct Count

Hi,

 

I have a measure for distinct partners using Partner id from my partner's table for 2 days (6/1/2022 and 6/2/2022)

# of partners = distinctcount(Partner id)

Used another column to show the visual for 2 days.

 

My customers wanted what is the difference between these 2 days - how much is increased for a category A, B, C & D

 

 6/1/20226/2/2022Difference
ProgramCommercialRetailCommercialRetailCommercialRetail
Program1533122
Program261521-1
Program32051-3-1

 

Please I need some urgent support on this

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @mohan_g_das1986 ,

 

I can't combine the table you shared with the description of your requirement.

Please share some sample data and expected result.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
sturlaws
Resident Rockstar
Resident Rockstar

Hi,

 

I suspect you have not shared all your requirements, I guess your end users want to filter on period, and see the change over that period. It will depend on your modell, but given your description, I have created a mockup report, and created this measure

Measure =
VAR _minDate =
    MIN ( 'Table'[date] )
VAR _maxDate =
    MAX ( 'Table'[date] )
VAR _minDateValue =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER ( ALL ( 'Table'[date] ), 'Table'[date] = _minDate )
    )
VAR _maxDateValue =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER ( ALL ( 'Table'[date] ), 'Table'[date] = _maxDate )
    )
RETURN
    IF (
        HASONEVALUE ( 'Table'[date] ),
        COUNTROWS ( 'Table' ),
        _maxDateValue - _minDateValue
    )

 

which will show the difference in the total column, and rename the total label to difference:

sturlaws_1-1654363005098.png

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors