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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
sovereignauto
Helper III
Helper III

Detailed summary Table

Good Morning,

 

So once again after some help! 

I have the attached which is an example as orginal has 2 years of data and many more rows and columns (about 10k rows per year for claims and 150k per year for notes) that i need to try to work out how to do the following.. 

" I need to see for each day of the year how many files each handler had open and the % of these where the last note was more than 3 days ago" 

So i have 1 table which contains all file references with the date opend and date closed with handler name (as part of a bigger table),

I then have a notes table with Date of note and reference (as part of a bigger table) 

So im thinking i need to somehow create a date table which summarises by handler how many open files they had and of them open files how many werent contacted "in the notes table" in the last 3 days and then divide one against the other.



EDIT:  DropBox File 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @sovereignauto ,

 

Create a calendar table then add the following measure to your model:

Number claims open =
COUNTROWS (
    FILTER (
        Claims,
        Claims[Date Opend] <= MAX ( 'Calendar'[Date] )
            && Claims[Date Closed ] >= MAX ( 'Calendar'[Date] )
    )
)
PercentageOfNotes =
VAR tempTable =
    SELECTCOLUMNS (
        FILTER (
            Claims,
            Claims[Date Opend] <= MAX ( 'Calendar'[Date] )
                && Claims[Date Closed ] >= MAX ( 'Calendar'[Date] )
        ),
        "Claim", Claims[Ref]
    )
VAR Notes_Values =
    SUMMARIZE (
        FILTER (
            'Notes',
            Notes[Date] <= MAX ( 'Calendar'[Date] )
                && Notes[Date]
                    >= MAX ( 'Calendar'[Date] ) - 2
                && Notes[Ref] IN tempTable
        ),
        Notes[Ref]
    )
RETURN
    DIVIDE ( COUNTROWS ( Notes_Values ), [Number claims open] )

 

See result below and in attach PBIX file.

MFelix_0-1625052327206.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @sovereignauto ,

 

Create a calendar table then add the following measure to your model:

Number claims open =
COUNTROWS (
    FILTER (
        Claims,
        Claims[Date Opend] <= MAX ( 'Calendar'[Date] )
            && Claims[Date Closed ] >= MAX ( 'Calendar'[Date] )
    )
)
PercentageOfNotes =
VAR tempTable =
    SELECTCOLUMNS (
        FILTER (
            Claims,
            Claims[Date Opend] <= MAX ( 'Calendar'[Date] )
                && Claims[Date Closed ] >= MAX ( 'Calendar'[Date] )
        ),
        "Claim", Claims[Ref]
    )
VAR Notes_Values =
    SUMMARIZE (
        FILTER (
            'Notes',
            Notes[Date] <= MAX ( 'Calendar'[Date] )
                && Notes[Date]
                    >= MAX ( 'Calendar'[Date] ) - 2
                && Notes[Ref] IN tempTable
        ),
        Notes[Ref]
    )
RETURN
    DIVIDE ( COUNTROWS ( Notes_Values ), [Number claims open] )

 

See result below and in attach PBIX file.

MFelix_0-1625052327206.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



@MFelix thank you so much it is a great start! 

Do you know how i would be able to "group by" Handler as well as date? so for each date how many files each handler had?

Hi @sovereignauto ,

 

Not sure if I understand what you want to but in the example I send out you just need to add the Handler to the Column series:

 

MFelix_0-1625060958859.png

In the way the measures are calculated you can use any column on your tables to give further detail.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.