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

Units Market Share change per vendor selected

Hi,

 

I am trying to make a line graph that compares percent units market share to percent units market share rolling 12 months and to be able to change it to compare the spcific vendor. I am believing that the result being created has the ability to compare the market share based on the comparison between vendors however it is unable to compare a selected vendor to the rest.

 

Capture.PNGCapture2.PNG

As you can see, once i select one vendor, the line flattens out. I believe it has something to do with the equation being able to compare all but unable to portray the selected over the unselected. The equation is as follows:

% Units market share r12m = divide([total units r12ms], calculate([total units r12ms], allexcept(data, data[csi vendor])))

 

How do I get this equation to be able to compare the selected over all and be able to change when I change who I select?

1 REPLY 1
Kristjan76
Responsive Resident
Responsive Resident

Hi there,

 

I am not sure if this is going to help you all the way, but hopefully give you some ideas. The problem is when you select the vendor from the list you are going to filter on that vendor and only that vendor, so the rest of the vendors are not visible to the graph.

 

I started out by creating a calculated table:

Vendor = VALUES('Data'[CSI Vendor])


And then I created two measures, one computing the marketshare of the selected vendors and then the marketshare of the non-selected vendors.

% Selected Vendor = 
VAR _SelVendor = VALUES(Vendor[Vendor])
VAR _VendSale = CALCULATE([Total Sale]; data[CSI Vendor] IN _SelVendor)
VAR _Total = CALCULATE([Total Sale];ALL(data[CSI Vendor]))
RETURN
DIVIDE(_VendSale;_Total)

% Non Selected Vendor = 
VAR _SelVendor = VALUES(Vendor[Vendor])
VAR _VendSale = CALCULATE([Total Sale]; NOT data[CSI Vendor] IN _SelVendor)
VAR _Total = CALCULATE([Total Sale];ALL(data[CSI Vendor]))
RETURN
DIVIDE(_VendSale;_Total)

Tehn you would use the Vendor as a filter on the page from the new table, and that table would not be connected to the rest of the model.

 

Best regards,

Kristjan

 

 

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