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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RvdHeijden
Post Prodigy
Post Prodigy

This is a hard one :)

I need a difficult formula to calculate the following.

 

I got 2 colums with dates in them and i calculated the difference (in minutes) between the 2 dates with the help of this forum for example 78 minutes or 1256 minutes

Now i have another table with, per client, different times in which i have to resolve an issue say for Clien A i have to resolve an issue with 120 minutes

 

I need a formula that compares the value in table 1 in combination with the TypeSLA for example:

 

Issue 1 for TypeSLA A (Column A) has been resolved in 100 minutes (Column B)

Table 2 has al the clients in it with the TypeSLA in which a issue has to be resolved, a sort of contract.

 

It has to compare the time needed to resolve the issue with the time i agreed to with the client and the result is either 'in time' or 'to late'

 

Hopefully someone can help me with this

 

 

1 ACCEPTED SOLUTION

Well, you could create a new query and perform a Merge (join) on them to create a new combined table. This is in the Query Editor.

 

You could also create a new table in the Modeling tab and possibly do something with DAX functions like CALCULATETABLE and SUMMARIZE, but not sure if either of those will get you where you want to be, but there may be another DAX function that will.

 

If you right click a table in the data model, you can choose to "Copy Table" but I do not know of a way to paste it back into the model, it is really for copying and pasting into other programs.

 

Finally, you could create a new table from scratch and essentially lookup values from the other tables but you would have to seed that table with something and build the relationships such that you could lookup the correct values.

 

Otherwise, not sure what your colleague is referring to but always willing to learn some new way of doing things.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

Not sure of your data model, I did this, created an Enter Data query "Tickets":

Type        Minutes

A100
B50
A1000
B3

 

Created another one, SLA's:

Type        Minutes

A120
B40

 

Related the two tables on "Type". Created a column in Tickets with the following formula:

 

Met = IF([Minutes]<RELATED(SLAs[Minutes]),"met","not met") 

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler

A collegue of mine said it is possible to copy colums from table A en B in a new table.

That way i can use colums from different sources into 1 table and use a simple formula greater then > or less then <

 

But how can i use/copy colums from table 'Tickets' and 'SLA' into a new table ?

 

There is already a relationship between 'TypeSLAId' en 'Id' in the table SLA

Well, you could create a new query and perform a Merge (join) on them to create a new combined table. This is in the Query Editor.

 

You could also create a new table in the Modeling tab and possibly do something with DAX functions like CALCULATETABLE and SUMMARIZE, but not sure if either of those will get you where you want to be, but there may be another DAX function that will.

 

If you right click a table in the data model, you can choose to "Copy Table" but I do not know of a way to paste it back into the model, it is really for copying and pasting into other programs.

 

Finally, you could create a new table from scratch and essentially lookup values from the other tables but you would have to seed that table with something and build the relationships such that you could lookup the correct values.

 

Otherwise, not sure what your colleague is referring to but always willing to learn some new way of doing things.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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