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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Matthijs12345
New Member

Date Difference in Direct Query with possibility to show on a grouped bar chart

Hello,

 

I want to calculate the difference between two dates. It is for me possible to do it in a measure, but it is not possible to get the networkdays in a group bar chart. See the result:

Matthijs12345_0-1660051098804.png

Matthijs12345_1-1660051132658.png


This is in a measure, but i cant create a calculated column or Power Query. How do i get the data in a grouped bar chart?

 

 

 

1 REPLY 1
MFelix
Super User
Super User

Hi @Matthijs12345 ,

 

Using this measure you can create another one based on the calculation of this one.

 

I don't have an idea how you have the table setup but if you do something similar to this should return expected result:

 

Total network days = SUMX(VALUES(Table[Column to groupby]), [Aantal werkdagen])

 

If this does not return the expected result try to do a summarize of the table with the values you need for the grouping, but for that without any data is difficult to pin point the exact code of the measure.

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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