Forum Discussion
Anonymous
6 years agoNot applicable
Cumulative Counts based on two date values
Hello everyone, I am working on a project to convert a manual excel report into a Power Bi dashbaord to create a line chart for three categories on items ( Urgent/ Minor/Major). The raw data ...
- 6 years ago
Hi Anonymous ,
Please pay attentation to ' '(Space) in your data. This is my PBIX file.
You can create your columns like this:
Urgent New Count = CALCULATE ( COUNTROWS ( 'Table 1' ) + 0, FILTER ( 'Table 1', 'Table 1'[New Week] < EARLIER ( 'Table 2'[Date] ) && ( 'Table 1'[Severity] ) = "Urgent" ) )Major New Count = CALCULATE ( COUNTROWS ( 'Table 1' ) + 0, FILTER ( 'Table 1', 'Table 1'[New Week] < EARLIER ( 'Table 2'[Date] ) && ( 'Table 1'[Severity] ) = "Major" ) )Minor New Count = CALCULATE ( COUNTROWS ( 'Table 1' ) + 0, FILTER ( 'Table 1', 'Table 1'[New Week] < EARLIER ( 'Table 2'[Date] ) && ( 'Table 1'[Severity] ) = "Minor" ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Icey
6 years agoCommunity Support
Hi Anonymous ,
Please pay attentation to ' '(Space) in your data. This is my PBIX file.
You can create your columns like this:
Urgent New Count =
CALCULATE (
COUNTROWS ( 'Table 1' ) + 0,
FILTER (
'Table 1',
'Table 1'[New Week] < EARLIER ( 'Table 2'[Date] )
&& ( 'Table 1'[Severity] ) = "Urgent"
)
)Major New Count =
CALCULATE (
COUNTROWS ( 'Table 1' ) + 0,
FILTER (
'Table 1',
'Table 1'[New Week] < EARLIER ( 'Table 2'[Date] )
&& ( 'Table 1'[Severity] ) = "Major"
)
)Minor New Count =
CALCULATE (
COUNTROWS ( 'Table 1' ) + 0,
FILTER (
'Table 1',
'Table 1'[New Week] < EARLIER ( 'Table 2'[Date] )
&& ( 'Table 1'[Severity] ) = "Minor"
)
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
This is great. Thank you so much!