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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
rpinxt
Impactful Individual
Impactful Individual

How to handle the blank beloning to a period in DAX

The situation because in words I had a hard time explaing:

rpinxt_0-1675346877428.png

 

As you see if In and Out have an amount it put N and when these are empty it gives "Y".

Did that with this formula :

Test = IF(
    CALCULATE([Q_ABS],'In/Out/Blank'[In/Out/B]="In") = 0 &&
    CALCULATE([Q_ABS],'In/Out/Blank'[In/Out/B]="Out") = 0,
    "Y","N")
 
Now as you see there is a third option Blank.
I need periods where in and out have an amount the blank should also be "N"
 
Because at the end I want to filter on Test and hide all the "Y" so only active periods are shown.
Don't know how to change the formula...
1 ACCEPTED SOLUTION
rpinxt
Impactful Individual
Impactful Individual

Ok..sorry for the spam but I put myself on the right track I guess 🤣

 

Fixed it using:

Activityfilter = CALCULATE([Q_ABS],REMOVEFILTERS('In/Out/Blank'))
 
Put that in the filter as not being blank and I only see the periods with activty and the blanks are still there between the column in the column chart (that was my end goal) 😉

View solution in original post

2 REPLIES 2
rpinxt
Impactful Individual
Impactful Individual

Ok..sorry for the spam but I put myself on the right track I guess 🤣

 

Fixed it using:

Activityfilter = CALCULATE([Q_ABS],REMOVEFILTERS('In/Out/Blank'))
 
Put that in the filter as not being blank and I only see the periods with activty and the blanks are still there between the column in the column chart (that was my end goal) 😉
rpinxt
Impactful Individual
Impactful Individual

Maybe it is better to calculate every amount in the period.

Like getting 3 times the same total amount per period.

 

But how would you sum all in the period without breaking it out because of the extra fields

(yes I understand I could remove the details fields but I need to show those 😛 )

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.