cancel
Showing results for
Did you mean:
Frequent Visitor

## Calculation between date periods

Hi all,

I am really struggling here and could do with some help!!

I am creating a Patching dashboard and as such, i want to show a difference between two date periods

I am showing the count of the following:

Critical

High

Medium

Low

In a nutshell i want to show the amount of criticals at a certain date (which i can change at any given time) and the ammount of critials at another date and then calculate the difference in critical's between the two dates and show this as a percentage and add it to a visual (i was thinking of uding a card)

I am open to some suggestions if anyone has anything they would reccomend.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: Calculation between date periods

Hi @cknightp91,

I made one sample for your reference.

1. Create a date table and create relationship with the fact table.

`Table = CALENDAR(MIN(Table1[date]),MAX('Table1'[date]))`

2. Create a measure as below.

`count = CALCULATE(COUNTROWS('Table1'),ALLSELECTED('Table'))`

For more details, please check the pbix as attached.

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Highlighted
Established Member

## Re: Calculation between date periods

Hi @cknightp91,

Please share some sample of your base data and the result you are expecting. The easiest way to share the sample is to copy paste an excel table with some sample values. This helps understanding your issue and requirement.

Regards,

Affan

Frequent Visitor

## Re: Calculation between date periods

I am pointing Power BI at an internal folder structure (which i drag and drop my CV's into each day) but below is an example of what one of the CSV's look like (obviously the dates will change per CSV)

Community Support Team

## Re: Calculation between date periods

Hi @cknightp91,

I made one sample for your reference.

1. Create a date table and create relationship with the fact table.

`Table = CALENDAR(MIN(Table1[date]),MAX('Table1'[date]))`

2. Create a measure as below.

`count = CALCULATE(COUNTROWS('Table1'),ALLSELECTED('Table'))`

For more details, please check the pbix as attached.

Regards,

Frank

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

## Re: Calculation between date periods

Hi @cknightp91,

Does that make sense? If so, kindly mark my answer as a solution to close the case.

Regards,
Frank

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

Announcements

#### Community Highlights

Find out what's new in the Power BI Community!

#### Power Platform Summit North America

Register by September 5 to save \$200

#### Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 381 members 4,508 guests
Recent signins: