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
gonrodrigues
Helper III
Helper III

Measure or Power Query?

Hello!

 

I have created 2 calculated columns:

 

This column counts the number of rows

 

QP Row Count = IF(COUNTROWS(RELATEDTABLE(QP))>0;COUNTROWS(RELATEDTABLE(QP)); 0)

And this one makes the difference from prior month

 

Difference From Prior Month = 'Variação'[QP Row Count] - CALCULATE(SUM('Variação'[QP Row Count]);DATEADD('Variação'[Date];-1;MONTH))

Here is the Table

 

VariationTable.jpg

 

To create a chart like this

 

variation.jpg

What's the problem? With calculated columns PBi doesn't allow me to create a relationship with Date table due to 'Circular dependency' error and without that i cannot use the proper filter from Date table.

 

Should i create a measure or power query? and how?

 

Thanks!!

6 REPLIES 6
v-qiuyu-msft
Community Support
Community Support

Hi @gonrodrigues,

 

You mentioned "With calculated columns PBi doesn't allow me to create a relationship with Date table due to 'Circular dependency' error and without that i cannot use the proper filter from Date table.", do you mean you want to filter waterfall chart based on the value from Date table, right?

 

I have followed your steps to create two calculated columns and a waterfall chart, everything is fine. In your scenario, you need to check relationship among QP, Variação and Date tables. Please refer to screenshots below:

 

w3.PNGw4.PNGw5.PNG

 

 

If you have any question, please feel free to ask.

 

Best Regards,
Qiuyun Yu

 

 

 

 

 

 

 

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

@v-qiuyu-msft

 

Can you help me doing these 2 columns in power query?Probably work this way 🙂

Hello @v-qiuyu-msft

 

absolutely right!

 

Capture.JPGCapture1.JPG

Hi @gonrodrigues,

 

In your original post, you mentioned you create two calculated columns: [QP Row Count] and [Difference From Prior Month] in table Variação, then you need to create a membership between Variação and QP tables instead of Variação and Data tables.

 

If issue persists, please share .pbix file for our analysis if possible.

 

Best Regards,
Qiuyun Yu

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

hey @v-qiuyu-msft

 

Said I needed to create a membership between variação and Data tables 🙂

Unfortunately, I cannot share .pbix file, it has confidential info

Hi @gonrodrigues,

 

Sorry for the late response. Smiley Tongue Without .PBIX file, I'm not able to analyze the issue closely. Would you please display the image about the relationship between all tables in your report? Perhaps I can find anything from there. Smiley Happy

 

Besides, please take a look at this similar thread: Circular dependency detected.

 

Best Regards,
Qiuyun Yu

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

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.