Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Everyone,
I have a small dataset (in the below table).
Fiscal_Year | Fiscal_Month | Subject_Title | Evaluation |
FYear20 | FMonth11 | Algebra I | Good |
FYear20 | FMonth11 | Algebra II | Bad |
FYear20 | FMonth11 | Algebra III | Bad |
FYear20 | FMonth12 | Statistic | Neutral |
FYear21 | FMonth01 | Social Science | Bad |
FYear21 | FMonth01 | Algorithms | Good |
With DAX formula (creadits to Tahreem24) was possible return the percentage for each "Evaluation" by "Fiscal_Month".
Fiscal_Year | Fiscal_Month | Subject_Title | Evaluation | % |
FYear20 | FMonth11 | Algebra I | Good | 33% |
FYear20 | FMonth11 | Algebra II | Bad | 33% |
FYear20 | FMonth11 | Algebra III | Bad | 33% |
FYear20 | FMonth12 | Statistic | Neutral | 100% |
FYear21 | FMonth01 | Social Science | Bad | 50% |
FYear21 | FMonth01 | Algorithms | Good | 50% |
So, now I need to return in a Card only the Neutral percenage for last Fiscal_Month. I don't have for the last Fiscal_Month any value for "Neutral" Evaluation, because of this the KPI card is returnig the value 100% for previus Fiscal_Month (FMonth12). I tryed to use as base some formulas to fill with "0" in case of sales when sales value is empty, but not work as expected.
I need just filter "Evaluation" as "Neutral" and return the last "Fiscal_Month" value, but in this case does anybody knows how to return "0" value when I don't have "Neutral" Evaluation for the last Fiscal_Mont "FMonth01"?
Solved! Go to Solution.
Hi, @Ito_c
If you want to fill with "0" in case of sales when sales value is empty, you need to add a separate dimension table for Evaluation, and then try measure mentioned by amitchandak.
Best Regards,
Community Support Team _ Eason
@Ito_c , have tried
% Eva =
VAR a_ = CALCULATE(COUNT(Table1[Fiscal_Month]))
VAR b_ = CALCULATE(COUNT(Table1[Fiscal_Month]),ALLEXCEPT('Table1',Table1[Fiscal_Month]))
RETURN DIVIDE(a_,b_,0)
or
% Eva =
VAR a_ = CALCULATE(COUNT(Table1[Fiscal_Month]))
VAR b_ = CALCULATE(COUNT(Table1[Fiscal_Month]),ALLEXCEPT('Table1',Table1[Fiscal_Month]))
RETURN DIVIDE(a_,b_,0)+0
Hi @amitchandak, include just "0" doesn't work in this case, keeping returning the previous Fiscal_Month where there is a value for column Evaluation:
I looking for this:
Hi, @Ito_c
If you want to fill with "0" in case of sales when sales value is empty, you need to add a separate dimension table for Evaluation, and then try measure mentioned by amitchandak.
Best Regards,
Community Support Team _ Eason
Thank you @v-easonf-msft works fine. Thank you @amitchandak for your support too!
User | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
123 | |
101 | |
71 | |
61 |