cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Magliasoft Frequent Visitor
Frequent Visitor

Create a new table according to criteria

Hello friends, I am a beginner in power bi and would like help depending on the criteria below

 

I have the following table:

Based on the last date I need to bring the cost of the cod 104.007.400.004

Result is 06/12/16 - Cost US$ 0.13

Creating a table with unique records

 

thank you

 

Forum_P1.png

 

6 REPLIES 6
Magliasoft Frequent Visitor
Frequent Visitor

Create a new table according to criteria

Hello friends, I am a beginner in power bi and would like help depending on the criteria below

 

I have the following table:

Based on the last date I need to bring the cost of the cod 104.007.400.004

Result is 06/12/16 - Cost US$ 0.13

Creating a table with unique records

 

thank you

 

Forum_P1.png

 

Super User
Super User

Re: Create a new table according to criteria

Hi,

 

So for each Cod, you'd like to determine the cost as on the last date.  Am i correct?  If yes, then please share the download link of your file.

Super User
Super User

Re: Create a new table according to criteria

Not certain I completely understand what you are going for here. You can create a measure like:

 

FinalCost = CALCULATE(MAX(table[COST]),FILTER(table,Date=MAX(Date)))

You can place this measure into a table visualization along with Cod.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Super User
Super User

Re: Create a new table according to criteria

Hi @Magliasoft,

 

You poasted the same question here yesterday.  Please stick to one thread.

Magliasoft Frequent Visitor
Frequent Visitor

Re: Create a new table according to criteria

Hi

With this function found here in the forum I solved part of the problem, I need to bring a table field and do the division
Example: cost / table = Percentage
013 / 0.95 = 13.68%

Thank You

Magliasoft Frequent Visitor
Frequent Visitor

Re: Create a new table according to criteria

.Tabela = ADDCOLUMNS(
    SUMMARIZE (
        MovimentoEntrada;
        MovimentoEntrada[COD_ITEM];
        "Data Operacao"; MAX ( MovimentoEntrada[DATA_OPERACAO] )
    );
    "CIF"; CALCULATE (
        SELECTEDVALUE ( MovimentoEntrada[CIF] );
        FILTER (
            MovimentoEntrada;
            MovimentoEntrada[DATA_OPERACAO] = [Data_Operacao]
                && MovimentoEntrada[COD_ITEM] = EARLIER ( MovimentoEntrada[COD_ITEM] )
        )
    )
)

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 394 members 4,148 guests
Please welcome our newest community members: