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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Simple (Date Sliced) Time Distribution w/ Inactive Relation

Hello,

supposedly a very simple problem.

 

"Table1":

fgaertne103119_2-1696007690434.png

...

 

"TimeTable" (full data is 08:00:00 - 16:30:00):

fgaertne103119_1-1696007369380.png

...

 

"DateTable" (2020-07-01 - Today):

fgaertne103119_3-1696007938054.png

....

 

Relationships:

fgaertne103119_4-1696008318782.png

I have a Date Slicer (DateTable[Date]) on my report page and have a visualization for my [LastUpdateTime] (with x-axis [Time_only] & y-axis Measure1 = CALCULATE(COUNTROWS('Table1'), GROUPBY('Table1','Table1'[LastUpdateTime])) )

fgaertne103119_5-1696008378341.png

So far so good, result is as expected (sum of the row count per 1min time window for the date range defined by the Date Slicer).

 

NOW, I would like to have the same visualization on my report page but for [IssueTime].

For this I've tried using the following measure:

Measure2 = CALCULATE(COUNTROWS('Table1'), USERELATIONSHIP(DayTable[Time_only],'Table1'[IssueTime]), GROUPBY('Table1','Table1'[IssueTime]))

 

BUT result is not as expected (not showing any counts or only very few when extending the date range via Date Slicer significantly).

 

What am i missing and how can i solve this problem?

Thanks!

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I found the solution, the USERELATIONSHIP function has to be wrapped in another CALCULATE like this Measure2 = CALCULATE(CALCULATE(...)), USERELATIONSHIP(..))). Weird because it also clearly had an effect when using it inside a single CALCULATE with the other functions. My lack of DAX knowledge prevents me to properly understand whats happening but fortunately it works now.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

I found the solution, the USERELATIONSHIP function has to be wrapped in another CALCULATE like this Measure2 = CALCULATE(CALCULATE(...)), USERELATIONSHIP(..))). Weird because it also clearly had an effect when using it inside a single CALCULATE with the other functions. My lack of DAX knowledge prevents me to properly understand whats happening but fortunately it works now.

123abc
Community Champion
Community Champion

..

Anonymous
Not applicable

Sounds like a reply from ChatGPT and looks rather useless to me

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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