cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
damj Frequent Visitor
Frequent Visitor

Counting Rows from table using external calender

Hi.

 

Im trying to count the rows of open errors in the table shown below (figure 1). The table shows a train computer logging errors from different trains.table.PNG

Figure 1. ( table of FACT_SAP_KILDE)

 

I have tried doing an external table and counting the rows of open errors like figure 2 below, and i works great! problem is, i can't relate to the table above (Figure 1)  and define which train or which group it belongs to.counting errors.PNG

Figure 2 ( Table of Komfort )

 

My question is if there is a way to make the same calulation for Figure 1 as performed in Figure 2, so the details from the train can be available?

 

 

Hope you guys can help.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Counting Rows from table using external calender

Hi @damj ,

 

We can put the train field and the following measure into a table visual, then put the 'Komfort'[Date] into a slicer to meet your requirement:

 

 

OpenErrorsCount =
CALCULATE (
    COUNTROWS ( 'FACT_SAP_KILDE' ),
    FILTER (
        'FACT_SAP_KILDE',
        [Afsluting_rev] >= MAX ( 'Komfort'[Date] )
            && [Opretted_rev] <= MIN ( 'Komfort'[Date] )
            && [type] = "ET"
    )
)

 

 

We can also use the 'Komfort'[Date] as the row field of matrix, train as the column field, use the measure as the value.

 

Best regards,

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

Community Support Team _ Dong Li
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

2 REPLIES 2
Community Support Team
Community Support Team

Re: Counting Rows from table using external calender

Hi @damj ,

 

We can put the train field and the following measure into a table visual, then put the 'Komfort'[Date] into a slicer to meet your requirement:

 

 

OpenErrorsCount =
CALCULATE (
    COUNTROWS ( 'FACT_SAP_KILDE' ),
    FILTER (
        'FACT_SAP_KILDE',
        [Afsluting_rev] >= MAX ( 'Komfort'[Date] )
            && [Opretted_rev] <= MIN ( 'Komfort'[Date] )
            && [type] = "ET"
    )
)

 

 

We can also use the 'Komfort'[Date] as the row field of matrix, train as the column field, use the measure as the value.

 

Best regards,

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

Community Support Team _ Dong Li
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

Community Support Team
Community Support Team

Re: Counting Rows from table using external calender

Hi @damj ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?

 

Best regards,

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

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

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors