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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jitpbi
Post Patron
Post Patron

measure for aggregated faults percentage

Hi,

 

Please refer the below table as a sample dataset for my query:

 

DeviceStatusDateTime
AHealthy10/21/2020   8:56:00 PM
AFault110/20/2020   6:24:00 PM
A

Fault2

10/21/2020   2:50:00 PM

AFault310/21/2020   3:47:00 PM
AHealthy10/21/2020   4:56:00 PM
BHealthy10/21/2020   2:16:00 PM
BHealthy10/20/2020   4:56:00 PM
BFault210/20/2020   6:15:00 PM
BFault310/21/2020   3:12:00 PM
BHealthy10/20/2020   8:03:00 PM

In the above table, device A has more faults than healthy status and device B has more healthy status than faults in the last 24 hours.

 

I want to create a measure on this which can let me know which device's status was more than 30% of faults in the last 24 hours. Also, I need to present this on the visual like "Device A has more than 50% of faults in the last 24 hours", so how to derive this measure and how to present on the visual as mentioned. 

 

Thanks

Thanks

 

3 REPLIES 3
CNENFRNL
Community Champion
Community Champion

Hi, @jitpbi , you might want to try this; a file is attached for your reference.Screenshot 2020-10-22 004217.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Hi @CNENFRNL ,

 

I can see Fault % for Device A is 60% and for Device B is 40% if we refer the SysLog table. Also, I need to show it like below:

 

"Device A is having 60% faults"

 

Thanks

CNENFRNL
Community Champion
Community Champion

@jitpbi , I didn't quite catch you; but I break down my idea to you,

  1. pinpointing a date/time option for observation
    Synthesis of a date slicer and a "hh:mm of day" slicer (unfortunately, PBI so far doesn't support hour-level or minute-levle slicer) brings about a selected date/time; which makes your observation dynamic
  2. calculation of fault %
    It's based on 24 hours before the selected date/time (e.g. 10/21/2020 3:00:00 PM in the dummy file) as you expected; that's to say, SysLog table is filtered down to a subset of records within this period

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors