Forum Discussion
DAX not working
- 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.
Hi Anees91 ,
Consider using summarize to create a Code's dimension table and then filter it. Try to share some sample data along with expected results.
Best regards,
Community Support Team_ Scott Chang
Hi, for example, if I have 16 failure volume out of 100 total volume, the % should be 16/100 * 100 = 16%, then i would display this result as 100 - 16 = 84%. This will be shown on the gauge visual. I also have combo chart where the x axis would be categories for failure volume, for example, a,b,c,d all showing 4 failure each for each category. If I click on the a specific category, the line on the chart will be the % showing 4/100 = 4% then 100-4% = 96%. This will be shown on the line on the combo chart however the gauge visual does not always reflect the same values (sometimes it does for a random category but not always) .. same measure used for the graph and gauge visual ..
- Anonymous1 year agoNot applicable
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.