cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User IV
Super User IV

@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

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
Super User IV
Super User IV

@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

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Memorable Member
Memorable Member

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!!

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors