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
Anonymous
Not applicable

How to get same values using Filter Pane vs. UseRelationship

Hi Community,

Please help me with following issue:

 

TABLES:

1. Issue-Table

IssueKeyIssueGroupOpened
123Group A01.01.2022
124Group B01.01.2022
125Group B01.01.2022
126Group B01.01.2022
127Group B01.01.2022

 


2. History-Table

History_IssueKeyHistory_StatusStatusStartStatusEndCalendar Week StartCalender Week End
123FirstStep12.02.202212.02.202266
124Milestone12.02.202212.02.202266
125Milestone12.02.202218.02.202267
126Milestone12.02.202219.02.202267
127Milestone12.02.202219.02.202267


3. Time-Table

DateCalender Week
12.02.20226
13.02.20226
......
18.02.20227
19.02.20227

 

RELATIONSHIPS:

- Issues & Time: DateOpened; Date (Active)

- Issues & History: IssueKey; History_IssueKey (Active)

- History & Time: Date; StatusStart (Inactive)

- History & Time: Date; StatusEnd (Inactive)

 

OBJECTIVE:

Calender WeekIssues_MilestoneStatusStartedIssues_MilestoneStatusEnded
500
641
703
.........

 

CURRENT MEASURES:

- Issues_MilestoneStatusStarted = CALCULATE(DISTINCTCOUNT(History[History_IssueKey]), History[HistoryStatus] = "Milestone", Issues[Group]="A", USERELATIONSHIP(History[StatusStart], Time[Date])

- Issues_MilestoneStatusEnded = CALCULATE(DISTINCTCOUNT(History[History_IssueKey]), History[HistoryStatus] = "Milestone", Issues[Group]="A", USERELATIONSHIP(History[StatusEnd], Time[Date])

 

Somehow the result i get is this. Both measures have the same results (and somehow I've got more counts than expected).

Calender WeekIssues_MilestoneStatusStartedIssues_MilestoneStatusEnded
500
655
71010
.........

 

If I use a card visual both measures display the same value. When I use the filter pane the cards show the right value:
1. filter CalenderWeekStart = 6 --> Card shows "4"
2. filter CalenderWeekEnd = 6 --> Card shows "1"

 

How can i correct my measures to get the right values in the table (v. "Objective")?

 

Thank you!

1 REPLY 1
v-rongtiep-msft
Community Support
Community Support

Hi @Anonymous ,

What is the data in the Time- table? Does not like the following?

vpollymsft_0-1666329960125.png

 

What do you want to calculate? Could you please provide your pbix file without privacy inforatmion and desired output.

 

Best Regards

Community Support Team _ Polly

 

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

 

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.