Forum Discussion
Anees91
1 year agoFrequent Visitor
DAX not working
Hi guys I'm working on a Pbi dashboard, mainly it's working fine, however I have an issue. so i have two columns for example, count of failure code and total delivery volume (including failure) .. i ...
- Anonymous1 year ago
Hi Anees91 ,
I made simple samples and you can check the results below:Table 2 = SUMMARIZE('Table',[Category]) Measure = var _s = SELECTEDVALUE('Table 2'[Category]) var _sum = COUNT('Table'[ID]) var _total = CALCULATE(COUNT('Table'[ID]),REMOVEFILTERS('Table'[Category]),FILTER('Table',[Fail]="Yes")) var _selecet = CALCULATE(COUNT('Table'[ID]),FILTER('Table',[Fail]="Yes"&&[Category]=_s)) RETURN IF(HASONEFILTER('Table 2'[Category]),1-DIVIDE(_selecet,_sum),1-DIVIDE(_total,_sum))An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Sahir_Maharaj
Super User
1 year agoHello Anees91,
Can you please try this approach:
Service Success =
1 - DIVIDE(
COUNT('Volume'[Failure.ConsignmentId]),
CALCULATE(
COUNT('Volume'[ConsignmentId]),
REMOVEFILTERS('Volume'[Failure.SFCCode]),
ALLSELECTED('Volume')
)
)
Anees91
1 year agoFrequent Visitor
Hi Sahir, thanks for replying. Unfortunately this still gives me the same issue .. I have no page filters set if that helps to clarify anything further