cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dhinesh28R
Post Prodigy
Post Prodigy

Chartcolumn filter based on O365 Department

Hi,

      I have  a chart column in my app.

 

 

This chartcolumn how to Filter by sender department (SenderName) from 0365 group as well as receiver department(ReceiverName) .How to get a Different separate chartcolumn for both Sender and Receiver.

Graph.png

 

Am using follwing formula,


AddColumns(GroupBy(AddColumns(Filter(List,Month(CreatedDate) = Dropdown3.Selected.ID, Year(CreatedDate) = Dropdown6.Selected.ID), "TypeField",Department,"SName",SenderName), "TypeField","SName"), "CountbyStatus", CountRows(SName))

 

 

But i want a different chartcolumn based on department from O365?

 

Is it possible?

 

Thanks,

Dhinesh

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @Dhinesh28R what does you list look like?

Lets assume something like CreatedDate, Department, Sender, Receiver 

 

For simplicity i will leave out the dates as that is just a filter for your data anyways ok.

Create a collection and add it to a button, collection: 

ClearCollect(_BarChart,
{Dpt:"SP",Sender:2,Receiver:5},
{Dpt:"SP",Sender:4,Receiver:2},
{Dpt:"HR",Sender:5,Receiver:2},
{Dpt:"SP",Sender:2,Receiver:4}
)

Here it is in a gallery

rubin_boer_0-1614065542899.png

 

Now lets add that to a bar chart with sender and receiver. Set the number of series at 2

Bar Chart Items = _BarChart

rubin_boer_1-1614065632909.png

The above shows you how to add multiple series to a chart

 

Now lets group that at department level (dpt)

Bar Chart Items = AddColumns(GroupBy(_BarChart,"Dpt","Departments"),"Sender Total", Sum(Departments,Sender),"Receiver Total",Sum(Departments,Receiver))

 

rubin_boer_2-1614065899070.png

 

Hope you can use this is your chart

 

 

 

 
hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.

View solution in original post

2 REPLIES 2
rubin_boer
Super User
Super User

hi @Dhinesh28R what does you list look like?

Lets assume something like CreatedDate, Department, Sender, Receiver 

 

For simplicity i will leave out the dates as that is just a filter for your data anyways ok.

Create a collection and add it to a button, collection: 

ClearCollect(_BarChart,
{Dpt:"SP",Sender:2,Receiver:5},
{Dpt:"SP",Sender:4,Receiver:2},
{Dpt:"HR",Sender:5,Receiver:2},
{Dpt:"SP",Sender:2,Receiver:4}
)

Here it is in a gallery

rubin_boer_0-1614065542899.png

 

Now lets add that to a bar chart with sender and receiver. Set the number of series at 2

Bar Chart Items = _BarChart

rubin_boer_1-1614065632909.png

The above shows you how to add multiple series to a chart

 

Now lets group that at department level (dpt)

Bar Chart Items = AddColumns(GroupBy(_BarChart,"Dpt","Departments"),"Sender Total", Sum(Departments,Sender),"Receiver Total",Sum(Departments,Receiver))

 

rubin_boer_2-1614065899070.png

 

Hope you can use this is your chart

 

 

 

 
hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.

@rubin_boer ,

Thanks man. Its working man.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,495)