Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have tried different measures but I cant see the distribution over a single year.
My formula calculate the market share for all years from 2001 till 2018 but how to do it for only one year ?
one year for one direction (import or export) = 100% market share
Market Share Import = DIVIDE(CALCULATE(SUM([Tons]));CALCULATE(SUM([Tons]);ALL('Details'); Table[Column] = "Import"))
Market Share Export = DIVIDE(CALCULATE(SUM([Tons]));CALCULATE(SUM([Tons]);ALL('Details'); Table[Column] = "Export"))
OR
Market Share = DIVIDE ( CALCULATE ( SUM ( [Tons] ) ), CALCULATE ( SUM ( [Tons] ), VALUES ( Details[Direction] ), ALL ( Details ) ) )
PBIX file = https://drive.google.com/open?id=1sRFKhMPu1LSjMtk58_Z7e_B1BTHhn5FS
Thank you for your help and support,
Jaouad
Hi @JaouadZrhibi,
Please update the measure Market Share to this one.
Market Share = DIVIDE(CALCULATE(SUM([Tons])),CALCULATE(SUM([Tons]),ALLEXCEPT('Details',Period[Year])))
Also please find the pbix attached.
Regards,
Frank
Hi Frank @v-frfei-msft Hi Greg @Greg_Deckler
I thank you for your measure but I need to separate Import & Export markets.
I would like to get 100% market share if we select only IMPORT.
Also 100% market share if we select only EXPORT.
In fact, it isn't pertinent to "mix" import & export markets because they are different markets.
File is here
https://drive.google.com/open?id=1sRFKhMPu1LSjMtk58_Z7e_B1BTHhn5FS
Please see the pictures below. Hope they will help you.
Thank you for your help !
Jaouad
@v-frfei-msft wrote:Hi @JaouadZrhibi,
Please update the measure Market Share to this one.
Market Share = DIVIDE(CALCULATE(SUM([Tons])),CALCULATE(SUM([Tons]),ALLEXCEPT('Details',Period[Year])))
Also please find the pbix attached.
Regards,
Frank
Hi @JaouadZrhibi,
Please check the formula again.
Market Share = var maxyear = MAX(Period[Year]) var Direction = SELECTEDVALUE(Details[Direction]) return DIVIDE(CALCULATE(SUM([Tons])),CALCULATE(SUM([Tons]),FILTER(ALL(Details),Details[Year]=maxyear && Details[Direction]=Direction)))
Regards,
Frank
It looks good, I m going to do some test.
If we want to see the market share on 2 years / 3 years or 10 years, can we get 100% for each one ?
For example, 2 years = 2016 and 2017 = 100% market share
3 years = 2013 + 2014 + 2015 = 100% market share
10 years = from 2009 till 2017 = 100% market share
Do we have to change all formula ? If it is too difficult, it is not necessary.
One year is really good.
I m sorry for disturbing you Frank.
Thank you very much for your help and time !!
Jaouad
@v-frfei-msft wrote:Hi @JaouadZrhibi,
Please check the formula again.
Market Share = var maxyear = MAX(Period[Year]) var Direction = SELECTEDVALUE(Details[Direction]) return DIVIDE(CALCULATE(SUM([Tons])),CALCULATE(SUM([Tons]),FILTER(ALL(Details),Details[Year]=maxyear && Details[Direction]=Direction)))
Regards,
Frank
Hi @JaouadZrhibi,
Here we go.
Market Share2 = var minyear = MIN(Period[Year]) var maxyear = MAX(Period[Year]) var Direction = SELECTEDVALUE(Details[Direction]) return DIVIDE(CALCULATE(SUM([Tons])),CALCULATE(SUM([Tons]),FILTER(ALL(Details),Details[Year]<=maxyear&&Details[Year]>=minyear && Details[Direction]=Direction)))
Regards,
Frank
I would like to know if this formula below is good for the Market Share measure :
Market Share = DIVIDE ( CALCULATE ( SUM ( [Tons] ) ); CALCULATE ( SUM ( [Tons] ); FILTER ( ALL ( 'Details' ); YEAR ( Details[Date] ) IN VALUES ( Period[Year] ) && Details[Direction] IN VALUES ( Details[Direction] ) ) ) )
Hi @JaouadZrhibi,
Just use the new measure in the visual, now shuold be ok. Please find the pbix attached. Also your formula worked well. You can refer to the third page.
Regards,
Frank
We need only one Market Share Measure for all widget on the same page, isn't it ?
We neen only one Market Share Measure for all widget on the same page, isn't it ?
I find figures above 100 % like on the pictures.
Is it normal ?
Regards,
Jaouad
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
87 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |