Forum Discussion
dax issue on months
left side visual is what by default we get in PBI
what I need is left side visual without jan month because there is no data for jan month in fact table
the logic I have written is if numerator and denominator is blank then 1, if numerator alone blank then 0 if numerator & denominator are not blank then numerator/denominator
month and region drill down is showing the expected value the only issue is I get an extra jan month data
-----------------------------------------------------------------------------------------------------------------------
dax:
| mk | region | inclusion flag | success |
| 1 | apac | y | 95 |
| 1 | europe | n | 85 |
| 1 | la | y | 91 |
| 1 | na | n | 97 |
| 1 | africa | n | 88 |
| 1 | australia | n | 95 |
| 1 | apac | y | 93 |
| 2 | europe | y | 94 |
| 2 | la | n | 89 |
| 2 | na | n | 88 |
| 2 | africa | n | 99 |
| 2 | australia | n | 80 |
| 2 | uae | n | 90 |
region
| region |
| apac |
| europe |
| la |
| na |
| africa |
| australia |
| uae |
month
| mk | m |
| 1 | nov |
| 2 | dec |
| 3 | jan |
12 Replies
- danextian
Super User
Hi animebuff
numerator=BLANK() && denominator=BLANK(),1,This is telling DAX to return 1 when both the numerator and the denominator are both blank and this is true for January.
numerator=BLANK(),0,This is telling DAX to return 0 a when the numerator is blank and this still is true for January. 0 value categories are not hidden so a column for January will still appear.
So why not just use
DIVIDE ( numerator, denominator )Note: I am using DIVIDE as a best practice.
- Ray_Minds
Solution Supplier
Hi animebuff
As I go through the measures provided by you. You mention that it doesn’t work properly. Here is update and tested version of that measure you can use to solve your issue as you can see the Fig below.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- animebuff
Helper I
nov month drill down values will not match,
it will show blank for values that needs to show 1