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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

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'))

Capture.PNG

 

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 others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

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'))

Capture.PNG

 

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 others find it more quickly.

Hi @Anonymous,

 

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 others find it more quickly.
affan
Solution Sage
Solution Sage

Hi @Anonymous,

 

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

Anonymous
Not applicable

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)

 

plugin_nameseverityip_addressnetbiosdnsdatelocation
MS16-087: Security Update for Windows Print Spooler (3170005)High00.000.0.00PC000000pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-118: Cumulative Security Update for Internet Explorer (3192887)High00.000.0.01PC000001pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-123: Security Update for Windows Kernel-Mode Drivers (3192892)High00.000.0.02PC000002pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-124: Security Update for Windows Registry (3193227)Low00.000.0.03PC000003pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-122: Security Update for Microsoft Video Control (3195360)High00.000.0.04PC000004pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-120: Security Update for Microsoft Graphics Component (3192884)High00.000.0.05PC000005pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-130: Security Update for Microsoft Windows (3199172)High00.000.0.06PC000006pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-131: Security Update for Microsoft Video Control (3199151)High00.000.0.07PC000007pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-132: Security Update for Microsoft Graphics Component (3199120)High00.000.0.08PC000008pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-134: Security Update for Common Log File System Driver (3193706)High00.000.0.09PC000009pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-135: Security Update for Windows Kernel-Mode Drivers (3199135)High00.000.0.10PC000010pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-137: Security Update for Windows Authentication Methods (3199173)High00.000.0.11PC000011pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-138: Security Update for Microsoft Virtual Hard Disk Driver (3199647)High00.000.0.12PC000012pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-140: Security Update for Boot Manager (3193479)High00.000.0.13PC000013pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-142: Cumulative Security Update for Internet Explorer (3198467)High00.000.0.14PC000014pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-144: Cumulative Security Update for Internet Explorer (3204059)High00.000.0.15PC000015pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-146: Security Update for Microsoft Graphics Component (3204066)High00.000.0.16PC000016pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-147: Security Update for Microsoft Uniscribe (3204063)High00.000.0.17PC000017pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-151: Security Update for Windows Kernel-Mode Drivers (3205651)High00.000.0.18PC000018pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-153: Security Update for Common Log File System Driver (3207328)Low00.000.0.19PC000019pc000000.corp.local07/11/2018PBG - Location - EWC
MS16-149: Security Update for Microsoft Windows (3205655)High00.000.0.20PC000020pc000000.corp.local07/11/2018PBG - Location - EWC
MS17-009: Security Update for Microsoft Windows PDF Library (4010319)High00.000.0.21PC000021pc000000.corp.local07/11/2018PBG - Location - EWC
MS17-011: Security Update for Microsoft Uniscribe (4013076)High00.000.0.22PC000022pc000000.corp.local07/11/2018PBG - Location - EWC
MS17-017: Security Update for Windows Kernel (4013081)High00.000.0.23PC000023pc000000.corp.local07/11/2018PBG - Location - EWC
MS17-021: Security Update for Windows DirectShow (4010318)Medium00.000.0.24PC000024pc000000.corp.local07/11/2018PBG - Location - EWC
MS17-010: Security Update for Microsoft Windows SMB Server (4013389) (ETERNALBLUE) (ETERNALCHAMPION) (ETERNALROMANCE) (ETERNALSYNERGY) (WannaCry) (EternalRocks) (Petya)Critical00.000.0.25PC000025pc000000.corp.local07/11/2018PBG - Location - EWC
MS17-018: Security Update for Windows Kernel-Mode Drivers (4013083)High00.000.0.26PC000026pc000000.corp.local07/11/2018PBG - Location - EWC
MS17-016: Security Update for Windows IIS (4013074)Medium00.000.0.27PC000027pc000000.corp.local07/11/2018PBG - Location - EWC
MS17-022: Security Update for Microsoft XML Core Services (4010321)Medium00.000.0.28PC000028pc000000.corp.local07/11/2018PBG - Location - EWC
MS17-012: Security Update for Microsoft Windows (4013078)Critical00.000.0.29PC000029pc000000.corp.local07/11/2018PBG - Location - EWC
MS17-013: Security Update for Microsoft Graphics Component (4013075)High00.000.0.30PC000030pc000000.corp.local07/11/2018PBG - Location - EWC
Windows 8.1 and Windows Server 2012 R2 April 2017 Security UpdatesHigh00.000.0.31PC000031pc000000.corp.local07/11/2018PBG - Location - EWC
Windows 8.1 and Windows Server 2012 R2 May 2017 Security UpdatesCritical00.000.0.32PC000032pc000000.corp.local07/11/2018PBG - Location - EWC
Windows 8.1 and Windows Server 2012 R2 June 2017 Security UpdatesCritical00.000.0.33PC000033pc000000.corp.local07/11/2018PBG - Location - EWC
Windows 8.1 and Windows Server 2012 R2 July 2017 Security UpdatesCritical00.000.0.34PC000034pc000000.corp.local07/11/2018PBG - Location - EWC
Windows 8.1 and Windows Server 2012 R2 August 2017 Security UpdatesHigh00.000.0.35PC000035pc000000.corp.local07/11/2018PBG - Location - EWC
Windows 8.1 and Windows Server 2012 R2 September 2017 Security UpdatesCritical00.000.0.36PC000036pc000000.corp.local07/11/2018PBG - Location - EWC
KB4038806: Security update for Adobe Flash Player (September 2017)High00.000.0.37PC000037pc000000.corp.local07/11/2018PBG - Location - EWC
Windows 8.1 and Windows Server 2012 R2 October 2017 Security Updates (KRACK)High00.000.0.38PC000038pc000000.corp.local07/11/2018PBG - Location - EWC
KB4049179: Security update for Adobe Flash Player (October 2017)High00.000.0.39PC000039pc000000.corp.local07/11/2018PBG - Location - EWC
KB4048951: Security update for Adobe Flash Player (November 2017)High00.000.0.40PC000040pc000000.corp.local07/11/2018PBG - Location - EWC
Windows 8.1 and Windows Server 2012 R2 November 2017 Security UpdatesHigh00.000.0.41PC000041pc000000.corp.local07/11/2018PBG - Location - EWC
Security Updates for Internet Explorer (November 2017)High00.000.0.42PC000042pc000000.corp.local07/11/2018PBG - Location - EWC
Security Updates for Internet Explorer (October 2017)High00.000.0.43PC000043pc000000.corp.local07/11/2018PBG - Location - EWC
KB4053577: Security update for Adobe Flash Player (December 2017)Medium00.000.0.44PC000044pc000000.corp.local07/11/2018PBG - Location - EWC
Windows 8.1 and Windows Server 2012 R2 December 2017 Security UpdatesHigh00.000.0.45PC000045pc000000.corp.local07/11/2018PBG - Location - EWC
Security Updates for Internet Explorer (December 2017)High00.000.0.46PC000046pc000000.corp.local07/11/2018PBG - Location - EWC
Security Updates for Internet Explorer (January 2018)High00.000.0.47PC000047pc000000.corp.local07/11/2018PBG - Location - EWC
KB4056898: Windows 8.1 and Windows Server 2012 R2 January 2018 Security Update (Meltdown)(Spectre)High00.000.0.48PC000048pc000000.corp.local07/11/2018PBG - Location - EWC

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.