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
PirataFabri
Frequent Visitor

I can´t create a table withou create a circular dependency

I need help with Power BI. Let me try to explain.

I have a table called WorkItems (coming from Azure). Here, I have one record for each WorkItemID. I also have another table (Cadastro) named FluxoPadrao. In this table, I have all the mandatory States for each WorkItemType (this field also exists in the WorkItems table).

I need to create a table called FA_WorkItems (FA = Flow Adherence). In this table, I need to have multiple records for each WorkItemId with State = Closed in the WorkItems table.

The number of records should be equal to the number of records (states) found in the FluxoPadrao table for the same WorkItemType.

The FA_WorkItems table should have the following format: WorkItemID, State.

Attached images might be helpful.

I've tried everything, but I always end up with some circular dependency problem.

PirataFabri_0-1713051394001.png

PirataFabri_1-1713051402807.png

 

1 ACCEPTED SOLUTION

@PirataFabri 

1. Merge WorkItems table with FluxoPadrao table (Join on WorkitemType) and retrieve different states of each workitem type)

2. Merge the result (from point 1) with WorkItemRevisions table (Join on WorkitemId) and retieve StatechangeDate. 

To achieve your desired output (with StateInDate and StateOutDate), I think you need to give an index column for both Workitems table and FluxoPadrao Table before performing the above merge operations. If you need any further help, please share the pbix file along with the sample data file.

 


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

View solution in original post

5 REPLIES 5
PirataFabri
Frequent Visitor

Work Items table
PirataFabri_0-1713067593645.png


FluxoPadrao Table

PirataFabri_1-1713067624692.png

------------
Desired FA_WorkItems Table

PirataFabri_2-1713067654028.png

--------------
WorkItemRevisions Table

PirataFabri_3-1713067675594.png

 

@PirataFabri 

1. Merge WorkItems table with FluxoPadrao table (Join on WorkitemType) and retrieve different states of each workitem type)

2. Merge the result (from point 1) with WorkItemRevisions table (Join on WorkitemId) and retieve StatechangeDate. 

To achieve your desired output (with StateInDate and StateOutDate), I think you need to give an index column for both Workitems table and FluxoPadrao Table before performing the above merge operations. If you need any further help, please share the pbix file along with the sample data file.

 


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

Worked perfectly. I was already able to create all the table I needed. Thank you very much!

Greg_Deckler
Super User
Super User

@PirataFabri Can you post sample data as text?


@ 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...

I am trying to post the data here. But it is not working

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.

Top Solution Authors
Top Kudoed Authors