Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello Power BI Community
I have a question regarding Infinity values
In my matrix I want the market share in the column for 2021 to show me the percentages for last year.
My Measures:
Hi,
The infinity is caused here by division. As a best practice you should use DIVIDE instead of "/". For LY calculation you can link your fact table to a calendar and create DAX like this:
LY measure = CALCULATE([Your Measure],SAMEPERIODLASTYEAR('Calendar'[Date]))
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
@ys034 , Try like
change this first
Grand Total Sales LY = CALCULATE([Total Sales LY],allselected())
then
divide([Total Sales LY],[Grand Total Sales LY],0)
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
unfortunately it did not work I have tried it with two measures at a time
in the first picture with the measure
MyMeasure: Grand Total Sales LY = CALCULATE([Total Sales LY],allselected())
and in the second measure I applied another AllSelected filter in the measure
MyMeasure= Grand Total Sales LY = CALCULATE([Total Sales LY],ALLSELECTED(),FILTER(ALLSELECTED('DataTable'),'DataTable'[Country] = MAx('DataTable'[Country])))
i hope anybody can help me out i would be grateful
Hi @ys034 ,
How about this:
Grand Total Sales LY =
CALCULATE ( [Total Sales LY], ALLEXCEPT ( 'DataTable', 'DataTable'[Country] ) )
If the above doesn't work, please share us some sample data for test. For your data security, please don't contain any sensitive information.
Reference:
How to Get Your Question Answered Quickly - Microsoft Power BI Community
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Icey
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
6 | |
4 | |
3 | |
3 |
User | Count |
---|---|
13 | |
11 | |
8 | |
8 | |
8 |