Skip to main content
cancel
Showing results for
Search instead for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I

## working day, total working day, running total

Below is the link to powerbi file. i need a big help from you..geniuses

Need following columns or measures

ColumnMT= MTD running shipped_amount
Working day (for example for Feb 1 2016, working day is 1, for Feb 8, 2016 it is 6 )
ColumnSH = month to date running shipped amount / working day
ColumnRR = ColumnAAC * Total no of working Days for that selected Year and Month

My Line Chart Axis=working Days, values are columnSH, ColumnRR

How can i achieve this? i have been strugling for a week. When i try to create columns, some function doesn't work. When i try to create measure, i am not able to use some calculated columns.

Please Help!!!

https://drive.google.com/open?id=0BzUkkp0vBBKiSHp0VVFHY1FYbFE

1 ACCEPTED SOLUTION
Solution Sage

Here. Check the updated file with added measures etc.

https://drive.google.com/open?id=0B-p4nPyEKzR1X05uVTV4bW9USUk

I'm still not certain what you want to show in the chart.

I'd suggest you go through each line carefully and verify that calculated values are what you wanted. If not, you'll want to give at least few samples so that either I or anyone else helping you can verify their solution.

16 REPLIES 16
Solution Sage

I'd recommend you add date dimention table.

Add new table with formula.

```DimDate =
CALENDAR (
DATE ( YEAR ( MINX ( Table1, Table1[transaction_date] ) ), 1, 1 ),
DATE ( YEAR ( MAXX ( Table1, Table1[transaction_date] ) ), 12, 31 )
)```

Add calculated column to DimDate

`Month = MONTH([Date])`
`Workday = IF(WEEKDAY([Date],2)>5,0,1)`

Then add following measures to Table1:

```ColumnMT =
CALCULATE (
SUM ( Table1[shipped_amount] ),
FILTER (
ALLSELECTED ( DimDate[Date].[Day] ),
DimDate[Date].[Day] <= MAX ( DimDate[Date].[Day] )
)
)```
```WorkingDays =
CALCULATE (
SUM ( DimDate[Workday] ),
FILTER (
ALLSELECTED ( DimDate[Date].[Day] ),
DimDate[Date].[Day] <= MAX ( DimDate[Date].[Day] )
)
)```
`ColumnSH = [ColumnMT]/[WorkingDays]`

However, I'm not sure what you mean by rest of your questions. I was not able to find ColumnAAC in your sample and can't understand how you want to present the data (if you need working days as axis, you'd need it not as measure but as calculated column).

Helper I

Helper I

You are really a genius 🙂
Sorry, That ColumnACC is ColumnSH

Now for ColumnRR i need to multiply ColumnSH to total no of working days for that month.
Please help me how to do this.

Yes i need working days as axis. how do i create calculated column of working days?

🙂

Solution Sage

I'm headed out for the night. I'll see if I can find the time tomorrow.

Helper I

Thank you!

Solution Sage

Not sure if this is what you wanted. I'm having trouble understanding purpose of Column RR.

At any rate, check the file in link.

https://drive.google.com/open?id=0B-p4nPyEKzR1V2k3M3k1djY0VUk

Helper I

WOW..you are very close. One last thing is working days. Working days is considered as Monday to Friday

Today is June 16, 2017, Day =16 but Working Day = 12.  And I am looking working days by month. Is it too much?

Other than that, the solution looks great.

I really appreciate your help.

Solution Sage

Hmm? Working days should adjust to each month. Remove filter from the visiual and you should see it.

If working days should be calculated regardless of filter. Instead of using the measure, use the calculated column added to DimDate table [RWkday].

Helper I

This is what i am getting. Am i doing something wrong?

`TestColumn = [ColumnMT]/RELATED(DimDate[RWkday])`

Solution Sage

You shouldn't devide measure by column. You should create another measure to devide it by.

I'm bit busy right now with work. I'll try to look at later it if you haven't solved it by then.

Helper I

Sure..i will wait for you. I have no idea how to make it happen. 😞

Solution Sage

Here. Check the updated file with added measures etc.

https://drive.google.com/open?id=0B-p4nPyEKzR1X05uVTV4bW9USUk

I'm still not certain what you want to show in the chart.

I'd suggest you go through each line carefully and verify that calculated values are what you wanted. If not, you'll want to give at least few samples so that either I or anyone else helping you can verify their solution.

Helper I

One thing i noticed that the numbers in the chart do not match.  It works when you put date (day) in the Axis.

Solution Sage

That's because you wanted to chart based on Working days.

Since it's just integer and each month there could be duplicate...

I suggest you use actual date column for axis.

Edit: Or alternately create another column, to plot... Ex. Month + Working days.

Helper I

Month+Working Days is not going to create duplicate values? How does that work?

Helper I

Perfect!! thank you so much.

## Helpful resources

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Join our Community Sticker Challenge

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

#### Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

#### Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors