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
AndradeRobson
Helper II
Helper II

DAX function to filter payment and ignore document issue date

Dear all, good evening!

 

Need help.

 

I have a table that already comes with the data I need ready from a database, that is, everything processed in power query without the need to process it in dax so far.

Below is the image:

AndradeRobson_0-1706481355421.png

AndradeRobson_1-1706481884309.png

 

 


Detail:

My calendar date is linked to the issue date and I have another link to the payment date where it is dotted.

I also have two Year and Month filters as shown in the image below:


Here in Brazil we have two tax situations:

1st Tax 4,5 and 6 = When paid, the supplier generates the tax
2nd Tax 1,2 and 3 = Regardless of the supplier's payment, it generates the tax to pay


My objective:

I have two columns, 01 Issuance and the Other payment date. Please, I need two reports, one that shows the 1st option above "1st Tax 4,5 and 6" and another condition that shows the 2nd Tax option 1,2 and 3.

 

Below is the model Pbix file.

 

https://www.transfernow.net/dl/20240128b5O4Y0Rg

 

Just one more detail in both reports.

 

"1st Tax 4,5 and 6" = You will ignore the issue date, filter by the payment date and only those with the payment date will appear in the report.

 

2nd Tax 1,2 and 3 = You will ignore the payment date, filter by the issue date and whether or not the payment date will appear in the report.

 

Please help me, I have little experience with DAX and when we run out of attempts I come to ask my colleagues for help.

 

Att.

 

Robson

 

 

1 REPLY 1
v-junyant-msft
Community Support
Community Support

Hi @AndradeRobson ,

Can you show me your expected results? I don't quite understand what you need. It would be best if you could write out your desired results in a table format (e.g. using excel) and take a screenshot for me.
I tried to make "1st Tax 4,5 and 6" according to my own understanding:
I create a measure by using this DAX:

Measure = 
IF(
    ISBLANK(MAX('01_Base_de_Dados'[PAGAMENTO])),
    0,
    1
)

And put this measure into the "Filters on this visual":

vjunyantmsft_0-1706495606333.png

The result is shown above, I'm not sure if this is the result you need.

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.