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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Invesco
Helper V
Helper V

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
Continued Contributor
Continued Contributor

Hi @Invesco ,

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
Continued Contributor
Continued Contributor

Hi @Invesco ,

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!

Hi Nikhil

 

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

NikhilChenna
Continued Contributor
Continued Contributor

Hi @Invesco ,

 

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
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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