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

Line chart to be created

I have a new calculated column created which reads as 

Used/Shared = IF('DO Vs Tag'[Order Owner ID]='DO Vs Tag'[Tag ID],"Used", "Shared")
Now I have another requirement where I have to create a graph with the data divided like this 
 
 
 
 
 
 

Capture.PNG

 

The blue part of the graph is used tag ids and the orange part is the shared tag id's. One of the way i thought was to create an unpivoted column but since the Used/Shared is a calculated column I could not do so. I just wanted to see if there is any other way apart from creaating 2 dofferent columns for used and shared.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@rveerasamy , I can see you are creating a column using Tag ID.

That can be used dimension for stacked.

if needed you can create measures

Used = calculate(count(Tag[ID]), [Used/Shared] ="Used")

Shared= calculate(count(Tag[ID]), [Used/Shared] ="Shared")

 

Or unpivot, but for that create this column in power query

Used/Shared = if [Order Owner ID]= [Tag ID] then "Used" else "Shared"

refer

https://radacad.com/pivot-and-unpivot-with-power-bi

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@rveerasamy , I can see you are creating a column using Tag ID.

That can be used dimension for stacked.

if needed you can create measures

Used = calculate(count(Tag[ID]), [Used/Shared] ="Used")

Shared= calculate(count(Tag[ID]), [Used/Shared] ="Shared")

 

Or unpivot, but for that create this column in power query

Used/Shared = if [Order Owner ID]= [Tag ID] then "Used" else "Shared"

refer

https://radacad.com/pivot-and-unpivot-with-power-bi

 

FarhanAhmed
Community Champion
Community Champion

If you are using 2 different columns (unpivoted) you can put both in Values of "Stacked Column Chart"

If you have 1 column identifying (Shared/Used) and other Values, you put "Used/Shared " in legends and Values in Value of "Stacked Column Chart"







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

Proud to be a Super User!




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.