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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
VGuichard
Frequent Visitor

Summarize without rows in fact table

Hello,

 

I'm working with data from a ticketing tool. For each location, I have a some tickets and for each ticket, a number of service unavailabity.

 

For each location, I need to calculate the rate of availabity with this formulas :

(Number of hours in the month - Number of Hours on unavailability) / Number of hours in the month

VGuichard_0-1644241463356.png

For example in janv-21 : 31 days => 31*24 = 744 hours 

Rate of availability => (744 - 257.81)/ 744 = 65.35 %  

For information, in the DimDate, I add the numbers of hours in each month

And finally for all the year, the rate of availabilty is 44,27 %

 

But It is wrong because in february/may/june& november, I haven't ticket in the fact table, so the rate of availability for these 4 months must be 100 %  (AND NOT BLANK...) . So my global KPIs (for one year) and for the "Location1" must be :

VGuichard_1-1644241752049.png

 

For information? I need to display the global "RateOfAvailability" for all location (average of rate of availability per location) and the repartition per month. Also I have a lot of slicer, so we can not use a table with DAX.

VGuichard_2-1644242634109.png

 

I try with SUMMARIZE, but as I don't have rows for some couples "Location/Month" in the fact table, the measure is false :

RateOfAvailability% =
            AVERAGEX(
                          SUMMARIZE(Fact_ServiceRequest
                         ,Dim_ServiceTicket[X_NOM_COURT_ADRESSE]        --Location
                         ,Dim_Date[MoisAnnéeInt]
                        ,"RateOfAvailability%",IF(countrows(F_Incident)=0
                             ,1
                             ,DIVIDE(MAX(D_Date[NbJourMois])*24-SUM(F_Incident[X_TPS_INDISPO]),MAX(D_Date[NbJourMois])*24)
                          )
           ,[TpsIndispo%]
           )
 
Thanks you for your help
 
 

 

4 REPLIES 4
v-janeyg-msft
Community Support
Community Support

@VGuichard  Any updates?

VGuichard
Frequent Visitor

Thank you Amitchandak, but I don't understand what you want to calculate.

 

My query work for the month with data in fact table (I upddated the query with good name 🙂 😞 

 

RateOfAvailability% =
            AVERAGEX(
                          SUMMARIZE(Fact_ServiceRequest
                         ,Dim_ServiceTicket[X_NOM_COURT_ADRESSE]        --Location
                         ,Dim_Date[MoisAnnéeInt]
                        ,"RateOfAvailability%",IF(countrows(Fact_ServiceRequest)=0
                             ,1
                             ,DIVIDE(MAX(D_Date[NbDaysByMonth])*24-SUM(Fact_ServiceRequest[Nb_Of_Hours_Unavailable]),MAX(D_Date[NbDaysByMonth])*24)
                          )
           ,[RateOfUnavailability%]
           )
 
The question is how to date the month without Ticket (100 % of avaibility by defaut)
 
Thanks

Hi, @VGuichard 

 

I didn't understand your question, do you want to show 100% in the bar chart? And is the value in the card visual correct? What's the difference between your current result and your desired result?

vjaneygmsft_1-1644481248155.png

 

Janey

 

amitchandak
Super User
Super User

@VGuichard ,  Try a measure like

available Hours 

sumx(values('Date'[Month Year]),day(max(fact[Date]))*24 )

 

or

 

sumx(values('Date'[Month Year]),day(eomonth(max(fact[Date]),0) )*24 )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors