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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Measure gives wrong % Value when date is applied to bar chart visual

Hi Experts

 

Here is my measure each of the individual measure give the correct values (ie. _ALL = 153 Practices and _AllCategory = 5 practices with that particular product) 

 

When i add the date column from DimDate to X-axis and the above meaure to the Y-axis i get 100% when the correct answer is (5/153=3.3%)

 

The measure is a card visual give me 3.3% - the issue is adding date into the equation....

Total Products =
VAR _ALL = CALCULATE(DISTINCTCOUNT('dev_shc_shingrix_activity'[P Name]),
    FILTER(ALLSELECTED('dev_shc_shingrix_activity'),'dev_shc_shingrix_activity'[Region]=MAX('dev_shc_shingrix_activity'[Region]) &&
        'dev_shc_shingrix_activity'[Area]=MAX('dev_shc_shingrix_activity'[Area])))

VAR _ALLCategories =
        CALCULATE(DISTINCTCOUNT('dev_shc_shingrix_activity'[P Name]),
    FILTER('dev_shc_shingrix_activity','dev_shc_shingrix_activity'[product_name] ="Shingrix"))

Return
        DIVIDE(_ALLCategories,_ALL,0)
1 ACCEPTED SOLUTION
NikhilChenna
Skilled Sharer
Skilled Sharer

Hi @Anonymous ,

Please check once have you created a relationship between from dimdate table to dev_shc_shingrix_activity based on the date column. If not please create it the issue will get resolved.

 

Regards,

Nikhil Chenna

 

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

View solution in original post

3 REPLIES 3
NikhilChenna
Skilled Sharer
Skilled Sharer

Hi @Anonymous ,

Please check once have you created a relationship between from dimdate table to dev_shc_shingrix_activity based on the date column. If not please create it the issue will get resolved.

 

Regards,

Nikhil Chenna

 

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

Anonymous
Not applicable

Hi Nikhil

 

The relationship is all fine one to many....

Hi @Anonymous ,

 

Then the issue will be in the measure please break it down it into pieces.

 

Regards,

Nikhil Chenna

 

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.