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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Edgar_massa
Helper II
Helper II

Use measurement result to create another

good night dear

I have a table where I make a difference of simple days, using the following measure:

Edgar_massa_1-1694035720230.png

Edgar_massa_2-1694035758201.png

 

But I'm trying to use the day difference result to create a deadline status measure as follows:

Edgar_massa_3-1694035881904.png

 

But it gives some error and the table is as follows:

Edgar_massa_4-1694035937541.png

 

What am I doing wrong?

 

 

 

 

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Edgar_massa ,

If I understand correctly, it seems that the measure [Status] can't return the correct result base on the measure [Deadline Days]. Am I right? Please create a measure as below base on the measure [Prazo em Dias] as below and update the formula of measure [Status] as below. Later please check if it can return the correct result...

Measure =
SUMX (
    GROUPBY (
        fac_TicketsHistorico,
        fac_TicketsHistorico[dt_envio_financeiro],
        fac_TicketsHistorico[dt_prev_pagamento],
        fac_TicketsHistorico[Codigo]
    ),
    [Prazo em Dias]
)
Status = IF([Measure]<=5,"NOK","OK")

vyiruanmsft_1-1696314959261.png

If the above one can't help you get the expected result, please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-yiruan-msft
Community Support
Community Support

Hi @Edgar_massa ,

If I understand correctly, it seems that the measure [Status] can't return the correct result base on the measure [Deadline Days]. Am I right? Please create a measure as below base on the measure [Prazo em Dias] as below and update the formula of measure [Status] as below. Later please check if it can return the correct result...

Measure =
SUMX (
    GROUPBY (
        fac_TicketsHistorico,
        fac_TicketsHistorico[dt_envio_financeiro],
        fac_TicketsHistorico[dt_prev_pagamento],
        fac_TicketsHistorico[Codigo]
    ),
    [Prazo em Dias]
)
Status = IF([Measure]<=5,"NOK","OK")

vyiruanmsft_1-1696314959261.png

If the above one can't help you get the expected result, please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
parry2k
Super User
Super User

@Edgar_massa columns in your screenshot are in Spanish and I cannot correlate those with the reply you have provided. I hope someone with Spanish knowledge can help you. Details of this post is making everything complicated for no reason. good luck!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Edgar_massa I'm still not clear, If you remove the status measure from the 2nd screen shot then you see the days in prazo em dias measure.

 

Just confirming, are you adding measures or calculated columns?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

 

I want to create a measure called Status, where based on the result of the "Deadline Days" measure, if it is less than or equal to 5, it will be out of date, if it will not be up to date, the only measure in this table is the "Deadline Days", the rest are all table columns, I just need to create another measure that brings the description up to date or not based on the deadline in days, but when I add the measure that has the IF, the table is wrong, according to the second print

parry2k
Super User
Super User

@Edgar_massa why prazo em dias showing value in the first screenshot and not the 2nd one? 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

The second print of the table is when I use the measure of days to create another measure, where everything is returning wrong, I don't understand what is happening, I can use the period of days to create a text where if it is less than or equal to 5, return the text "Out of time" if not "Up to date" ?

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.