cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

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

 

 

 

 

View solution in original post

2 REPLIES 2
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

 

 

 

 

View solution in original post

@rubin_boer ,

Thanks man. Its working man.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (65,851)