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
dmykins
New Member

Comparing Two Columns in a Line Graph

I am looking to have two lines on my line graph, one showing total entries each week over a period of time, the other line would show manufacturers entered over the same period. 

 

My data looks like this:

RegionChannel# of Entries GainedWeek EnteredManufacturerMonth Entered
WestTrade11Bradford WhiteJune
EastDistribution11No PurchaseJune

 

This type of data goes through the month of August currently. 

 

I can graph it to look like this:

dmykins_0-1629746917551.png

  

This is correct in it shows the total entries in blue and total (cumulative) manufacturer entries in purple.
Ideally I want that purple line to show whichever manufacturer I select, while the blue line remains the same. 

I filtered by manufacturer, but it effects both lines in the graph.

 

Any help is appreciated! 

 

 

6 REPLIES 6
VahidDM
Super User
Super User

Hi @dmykins 

 

Try to use REMOVEFILTERS or ALL DAX codes to avoid filtering the " # of Entries Gained" by manufacturer.

Something like these:

 

No. of Entries Gained = calculate (sum(table[# of Entries Gained]),REMOVEFILTER(table[Manufacturer]))

OR

No. of Entries Gained = calculate (sum(table[# of Entries Gained]),ALL('table')

 

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

Appreciate your Kudos VahidDM_0-1629774112220.png !!

Unfortunately, it has not. I will upload a screenshot of how the data is set up, but I only have the one table, so maybe that is why? I messed around with trying to get REMOVEFILTER to work, but to no avail. 

dmykins_0-1629817391596.png

 

Hi, @dmykins 

Can you show the formula you are currently using for the new measure based on the field [#of Entries Gain]?

 

Best Regards,
Community Support Team _ Eason

 

Good Morning!

 

 I copied and pasted both of the suggested formulas, and messed around with them a bit, unfortunately, they still filtered so I started to just mess with it on my own and ended up with this: 

Total Entries REMOVEFILTERS() = CALCULATE(SUM('Individual Entries'[# of Entries Gained]))
 
Again, it calculates the total fine, but doesn't ignore the filter. 

@dmykins 

 

Try this measure:

 

No. of Entries Gained = calculate (sum(SUM('Individual Entries'[# of Entries Gained]),REMOVEFILTER('Individual Entries'[Manufacturer]))

 

 

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

Appreciate your Kudos VahidDM_0-1629982055426.png !!

No. of Entries Gained = calculate (sum(SUM('Individual Entries'[# of Entries Gained]),REMOVEFILTER('Individual Entries'[Manufacturer]))
)
 
When adding that in the formula, it is all basically underlined in red with warnings saying parameter is no the proper type, removefilter is not a function. 

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.