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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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