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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Measure doesn't work in service

Hello,

i have a measure that works perfectly in desktop but in the service doesn't. I need to count all the workdays in a month. In the service just count the days until today...

Workdays/Month = CALCULATE(SUM('Calendar'[WeekdayWeekend]),DATESBETWEEN('Calendar'[Date], STARTOFMONTH('Calendar'[Date]), ENDOFMONTH('Calendar'[Date])))
 
Thanks for your help,
Regards.
14 REPLIES 14
Anonymous
Not applicable

Hi,

 

I found out that i cannot access to any date next today... I have a calendar table which countains dates until the end of 2020. In the Desktop i can access to them, in the service didn't...

 

Does someone have the same problem?

 

Thanks for your help.

 

Best Regards, Ana.

v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

Would you please show us the screenshot of the output in desktop and service?And why you use SUM in your formula,  I think you might need to use COUNT .

 

 

Workdays/Month = CALCULATE(COUNT('Calendar'[WeekdayWeekend]),DATESBETWEEN('Calendar'[Date], STARTOFMONTH('Calendar'[Date]), ENDOFMONTH('Calendar'[Date])))

 

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

GilbertQ
Super User
Super User

Hi there

Have you refreshed the dataset in the Power BI Service?

Can you confirm that there is data?

And finally can you please post an screenshot of the error you are receiving?




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

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

Hi @GilbertQ and @v-deddai1-msft,

 

In the Desktop i have this scenario:

Desktop.png

and in the Service this (after refresh):

Service.png

 

Doesn't appear any error, just the counting of the days is wrong.

I used the SUM measure because i convert all the "Weekday" to 1 and the "Weekend" to 0, i tried to use the COUNT but it doesn't work...

The Worked days measure is just a SUM of the "Weekdays", the other is a difference between the other two.

 

Thanks for the help!

Hi @Anonymous ,

 

Would you please show us pbix file by onedrive for business if possible?

 

Please do mask sensitive data before uploading.

 

Thanks for your understanding and support.

Best Regards,

Dedmon Dai

 

Anonymous
Not applicable

Hi @v-deddai1-msft ,

 

Sorry for the question, but can you please tell me how to do it?

 

Best Regards,

Ana.

 

Hi @Anonymous ,

 

Please refer to https://www.itprotoday.com/office-365/how-share-file-or-folder-onedrive-business-office-365

 

Best Regards,

Dedmon Dai

Anonymous
Not applicable

Hi @v-deddai1-msft,

 

Sorry for the question, but to protect the data i need to extract the .pbit, right?

I'm a bit of new in this world...

 

Thanks for the support.

 

Best Regards, Ana.

Hi @Anonymous ,

 

Just delete the sensitive data in your data model.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

Anonymous
Not applicable

Hi @Anonymous ,

 

It works well in my environment and your formula is correct. Would you please try to clear broswer cache and publish it again.

 

Capture1.PNG

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

Anonymous
Not applicable

Hi @v-deddai1-msft,

 

Worked well after the refresh?

I already cleaned but it remains the same...

 

Thanks for the help.

 

Best regards, Ana.

Hi @Anonymous ,

 

Are you using the latest version of Power BI desktop?  And what's your service tenant? I also suggest you open a support ticket. If you have a Pro account it is free. Go to https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET".

 

Best Regards,

Dedmon Dai

Hi @Anonymous ,

 

Are you using the latest version of Power BI desktop?  And what's your service tenant? I also suggest you open a support ticket. If you have a Pro account it is free. Go to https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET".

 

Best Regards,

Dedmon Dai

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors