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
Anonymous
Not applicable

IN POWER BI HOW TO FIND UNIQUE CUSTOMERS FOR A PARTICULAR MONTH WITH RESPECT TO DATE

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

Hi, @Anonymous ;

You could add another date table without relationship as slicer.

date = SUMMARIZE( SUMMARIZE('Table',[date],"month",EOMONTH([date],0)),[month])

then add a flag measure to filter it.

flag = 
IF (
    MAX ( 'Table'[value] )
        IN SUMMARIZE ( FILTER ( 'Table', [date] <= MAX ( 'date'[month] ) ), [value] )
            && CALCULATE (
                COUNT ( [value] ),
                FILTER (
                    ALL ( 'Table' ),
                    [value] = MAX ( [value] )
                        && [date] <= MAX ( 'date'[month] )
                )
            ) = 1,
    1
)

set the filter.

vyalanwumsft_0-1652668754184.png

The final show as follow:

vyalanwumsft_1-1652668969429.png

vyalanwumsft_2-1652668988307.png


Best Regards,
Community Support Team _ Yalan Wu
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

5 REPLIES 5
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

You could add another date table without relationship as slicer.

date = SUMMARIZE( SUMMARIZE('Table',[date],"month",EOMONTH([date],0)),[month])

then add a flag measure to filter it.

flag = 
IF (
    MAX ( 'Table'[value] )
        IN SUMMARIZE ( FILTER ( 'Table', [date] <= MAX ( 'date'[month] ) ), [value] )
            && CALCULATE (
                COUNT ( [value] ),
                FILTER (
                    ALL ( 'Table' ),
                    [value] = MAX ( [value] )
                        && [date] <= MAX ( 'date'[month] )
                )
            ) = 1,
    1
)

set the filter.

vyalanwumsft_0-1652668754184.png

The final show as follow:

vyalanwumsft_1-1652668969429.png

vyalanwumsft_2-1652668988307.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi,

 

Thank you so much!

Shishir22
Solution Sage
Solution Sage

Hello @Anonymous ,

 

Give relationship between two tables on date column.

Create measure as DistinctCount(Selphone[Selphone No]) and show it against Month from date table.

 

Please mark it as answer if it resolves the issue. Kudos are also appreciated

 

Cheers,
Shishir
Anonymous
Not applicable

Sorry, what if both SelPhone and date are columns in a same table how do we proceed.

I have an idea like take unique selphone so all repetitive customers are gone but the problem is how do I show that with respect to date.

It took me 5hrs but I am unable to find thanks for the quick reply.

You can still show that. 
Can you please share sample data(after hiding sensitive data) so that I can help you better?

 

 

Cheers,
Shishir

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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