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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Formulate the Following as a Measure

Hi Experts

 

I just did the following Steps.

I selected a Product ID72201092 from my table  went to View on tool bar selected Performance Analyzer > Start Recording > Selected the Products Complaints Totals with Trend Direct Table

 

Then Select copy Visual, this gave me the DAX code which allows me to cross filter. how can i convert this to a working measure that i can add into my power bi report.

 

DEFINE =
VAR __DS0FilterTable = TREATAS({"Y"}, 'PMS_FINANCIAL_PDS'[ROLL12_COMPLETE_PDS_IND])

VAR __ValueFilterDM0 = FILTER(
KEEPFILTERS(
SUMMARIZECOLUMNS(
'PMS_PARTS'[Product],
__DS0FilterTable,
"p_value", '_Measures'[p-value],
"v__trend", '_Measures'[__trend],
"ArrowY", 'URLImages'[ArrowY],
"Significance_Y", '_Measures'[Significance Y],
"TAU", 'PMS_FINANCIAL_PDS'[TAU],
"NoTrend_Significants", '_TrendsTable'[NoTrend_Significants]
)
),
[NoTrend_Significants] > 0
)

VAR __DS0Core = 
SUMMARIZECOLUMNS(
'PMS_PARTS'[Product],
__DS0FilterTable,
__ValueFilterDM0,
"p_value", '_Measures'[p-value],
"v__trend", '_Measures'[__trend],
"ArrowY", 'URLImages'[ArrowY],
"Significance_Y", '_Measures'[Significance Y],
"TAU", 'PMS_FINANCIAL_PDS'[TAU],
"NoTrend_Significants", '_TrendsTable'[NoTrend_Significants]
)

EVALUATE
GROUPBY(
__DS0Core,
"MinNoTrend_Significants", MINX(CURRENTGROUP(), [NoTrend_Significants]),
"MaxNoTrend_Significants", MAXX(CURRENTGROUP(), [NoTrend_Significants])
)

EVALUATE
TOPN(501, __DS0Core, 'PMS_PARTS'[Product], 1)

ORDER BY
'PMS_PARTS'[Product]
1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

I am not sure what desired result would you want, could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Please read this post to get your answer quickly: How to Get Your Question Answered Quickly.

 

Best Regards,

Amy

 

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

 

 

View solution in original post

1 REPLY 1
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

I am not sure what desired result would you want, could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Please read this post to get your answer quickly: How to Get Your Question Answered Quickly.

 

Best Regards,

Amy

 

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

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.