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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Filtered data not showing correctly in Bar graph

Hi Experts

 

See attached PBIX file with sample data. What i am trying to accomplish is when the user selects from the table product ID 72201092 the bar graph filters to reflect the element of the 156 that relates to product 72201092. which is does correct. 

 

The issue is when you select product code 72201092, and then select Significant Trend the bar graph goes to zero, and when you select No Trend you have values in the bar graph. 

 

What i am expect is for the bar grpah to plot the element of the data that relate to Significant trend in the bar chart as the product code has significant trend as shown in the above table and  no values for No Trend. 

 

https://www.dropbox.com/s/jj62h2vxtepm5yd/Sample__Test%281%29.pbix?dl=0

 

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

When you select the product, the month filter will apply to the p-value, so it will be judged as No Trend as always.

 

Filtered-data-not-showing-correctly-in-Bar-graph.png

 

Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more

Community Support Team _ Dong Li
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

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

When you select the product, the month filter will apply to the p-value, so it will be judged as No Trend as always.

 

Filtered-data-not-showing-correctly-in-Bar-graph.png

 

Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Community Team

i just did the following Steps. I selected Product ID72201092 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. Here is the code. Surely the answer must lie here, on how we can count the data poiints that are significant and those that have No Trend.

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]

 

Anonymous
Not applicable

hi Dong_li

 

I would expect the bar graph to filter when i select the product to show the element of the data that relates to No Trend and Signifcant trend , which it does, however the problem lie with the dis connect table. When you Select either No and or Significant Trend the values are wrong they do not correspond to the selection made.

 

i have added measure (test it) - believe there is a relationship issue somewhere between the measure and the [Month_Date] taken from PMS_Financials Table...

NO TREND

 

_Mnth_NoTrend = CALCULATE (
    IF (
        ISBLANK ( COUNTA ( 'PMS_COMPLAINT'[MATERIAL_ID]) ),
        BLANK (),
        COUNTA ( 'PMS_COMPLAINT'[MATERIAL_ID])
    ),
    FILTER (
        ALLSELECTED ( PMS_PARTS[Product] ),
        CALCULATE('_Measures'[p-value]) > 0.05
    )
) + 0

SIGNIFCANT TREND

Mnth_SignificantTrend = CALCULATE (
    IF (
        ISBLANK ( COUNTA ( 'PMS_COMPLAINT'[MATERIAL_ID]) ),
        BLANK (),
        COUNTA ( 'PMS_COMPLAINT'[MATERIAL_ID])
    ),
    FILTER (
        ALLSELECTED ( PMS_PARTS[Product] ),
        CALCULATE('_Measures'[p-value]) <= 0.05
    )
) + 0

And then added the following measure to the Bar Graph

_Mnth = VAR _ProductTrends = SELECTEDVALUE(_TrendsTable[Trends])
Return

SWITCH(TRUE(),
    _ProductTrends = "No Trend", [_Mnth_NoTrend],
    _ProductTrends = "Significant Trend", [Mnth_SignificantTrend],
[PMSComplaintsMN]
) + 0

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.