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

Calculating TAU value on the fly for a data set

HI Experts

 

Here is the original post by Greg a Super user GOD on power bi community. 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Kendall-s-Tau/td-p/625107

 

how could you expand on this to work out the TAU for any scanerio based on filter selection on your dashboard. 

Happy to provide a sample data file

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the very old feedback perrk2k. 

BUt i managed to solve the problem, i am surprised this question is still open, the solution to the problem is:

Tau 1 =
VAR Mytable =
SUMMARIZE (
PMS_FINANCIAL_PDS,
PMS_FINANCIAL_PDS[Month Start],
"CountComplaints", CALCULATE ( COUNTROWS ( PMS_COMPLAINT ) )
)
VAR Mytable1 =
ADDCOLUMNS (
Mytable,
"Index", RANKX ( PMS_FINANCIAL_PDS, PMS_FINANCIAL_PDS[Month Start],,, DENSE )
)
VAR __table1 =
ADDCOLUMNS (
Mytable1,
"__Concordant", COUNTROWS (
FILTER (
Mytable1,
[Index] > EARLIER ( [Index] )
&& [CountComplaints] > EARLIER ( [CountComplaints] )
)
)
)
VAR __table2 =
ADDCOLUMNS (
__table1,
"__Discordant", COUNTROWS (
FILTER (
Mytable1,
[Index] > EARLIER ( [Index] )
&& [CountComplaints] < EARLIER ( [CountComplaints] )
)
)
)
VAR _D =
SUMX ( __table1, [__Concordant] )
VAR _C =
SUMX ( __table2, [__Discordant] )
RETURN
DIVIDE ( _C - _D, _C + _D, 0 )

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Anonymous if you provide sample data and expected functionality and result, will help to provide you the solution.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thanks for the very old feedback perrk2k. 

BUt i managed to solve the problem, i am surprised this question is still open, the solution to the problem is:

Tau 1 =
VAR Mytable =
SUMMARIZE (
PMS_FINANCIAL_PDS,
PMS_FINANCIAL_PDS[Month Start],
"CountComplaints", CALCULATE ( COUNTROWS ( PMS_COMPLAINT ) )
)
VAR Mytable1 =
ADDCOLUMNS (
Mytable,
"Index", RANKX ( PMS_FINANCIAL_PDS, PMS_FINANCIAL_PDS[Month Start],,, DENSE )
)
VAR __table1 =
ADDCOLUMNS (
Mytable1,
"__Concordant", COUNTROWS (
FILTER (
Mytable1,
[Index] > EARLIER ( [Index] )
&& [CountComplaints] > EARLIER ( [CountComplaints] )
)
)
)
VAR __table2 =
ADDCOLUMNS (
__table1,
"__Discordant", COUNTROWS (
FILTER (
Mytable1,
[Index] > EARLIER ( [Index] )
&& [CountComplaints] < EARLIER ( [CountComplaints] )
)
)
)
VAR _D =
SUMX ( __table1, [__Concordant] )
VAR _C =
SUMX ( __table2, [__Discordant] )
RETURN
DIVIDE ( _C - _D, _C + _D, 0 )

@Anonymous nice to hear it was solved and thanks for posting the soluton. it can surely help others. cheers!!

 

 

Would appreciate Kudos 🙂 if my solution helped.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.