cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Faber13
Helper II
Helper II

TABLE WITH LAST REGISTRATION

Guys, I have a table with records of invoices that are repeated over time, I need to make a distinct count only of the most recent date of the records, ignoring the rest. I believe the value is wrong because we have repeated data in different periods

 

Faber13_0-1669818413486.png

 

1 ACCEPTED SOLUTION

Guys, I managed to solve it with the video below:

https://www.youtube.com/watch?v=hidJ5T_DYQ0   

View solution in original post

4 REPLIES 4
mangaus1111
Solution Sage
Solution Sage

Hi @Faber13 ,

which measure have you used in the wrong card?

I think if you use the function DISTINCTCOUNT('Table'[InvoiceNumber]) it works and then filter the most recent days with CALCULATE .

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi @mangaus1111  it's the same measure, it changes in the graph's filter context (for example: the same invoice can be at the beginning and at the end of the month)

Hi @Faber13 ,

You can create a measure as below to get it:

Measure =
VAR _maxdate =
    CALCULATE ( MAX ( 'table'[date] ), ALLSELECTED ( 'table' ) )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( 'table'[invoice number] ),
        FILTER ( ALLSELECTED ( 'table' ), 'table'[date] = _maxdate )
    )

If the above one can't help you get the expected result, could you please provide some sample data in your tables (exclude sensitive data) with Text format, the formula of measure which apply on the card visual and visual settingsIt is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

Guys, I managed to solve it with the video below:

https://www.youtube.com/watch?v=hidJ5T_DYQ0   

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.