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.
For the example, I have 2 simple tables:
1. Countries Table:
CountryID | Name | CurrencyCode |
1 | United States | USD |
2 | United Kingdom | GBP |
3 | Canada | CAD |
4 | Germany | EUR |
5 | France | EUR |
2. CurrencyExchangeRates Table:
CountryDate | CurrencyCode | Value |
1;1/1/2022 | USD | 1 |
1;1/2/2022 | USD | 1 |
1;1/3/2022 | USD | 1 |
2;1/1/2022 | GBP | 1.2 |
2;1/2/2022 | GBP | 1.3 |
2;1/3/2022 | GBP | 1.35 |
3;1/1/2022 | CAD | 0.7 |
3;1/2/2022 | CAD | 0.6 |
3;1/3/2022 | CAD | 0.8 |
4;1/1/2022 | EUR | 1.02 |
4;1/2/2022 | EUR | 1.1 |
4;1/3/2022 | EUR | 0.9 |
5;1/1/2022 | EUR | 1.02 |
5;1/2/2022 | EUR | 1.1 |
5;1/3/2022 | EUR | 0.9 |
And I'm trying to somehow end up with the following countries table:
CountryID | Name | CurrencyCode | Standard Deviation |
1 | United States | USD | 0 |
2 | United Kingdom | GBP | 0.076376262 |
3 | Canada | CAD | 0.1 |
4 | Germany | EUR | 0.100664459 |
5 | France | EUR | 0.100664459 |
I would prefer if the solution would be implemented using Power BI, and if through Power Query then avoiding M code unless it's inevitable.
Thanks a lot!
Jonathan
Solved! Go to Solution.
Hi, @jonoren ;
The relationship as follow:
Then create a measure.
Measure = STDEVX.S(SUMMARIZE('ExchangeRate',[CountryDate],[CurrencyCode],'ExchangeRate'[Value]),[Value])
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @jonoren ;
The relationship as follow:
Then create a measure.
Measure = STDEVX.S(SUMMARIZE('ExchangeRate',[CountryDate],[CurrencyCode],'ExchangeRate'[Value]),[Value])
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jonoren Can you confirm whether the records in the country table are distinct or not?
Regards,
Atma.
I just edited the question to reflect they are not distinct
Hi @jonoren Please check whether you are using the countryside from the country table and the country from the exchange table are used to create a relation.
If this post helps, then please consider accepting it as the solution to help the other members find it more quickly.
Thanks and Regards,
Atma.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
94 | |
74 | |
71 | |
64 |
User | Count |
---|---|
143 | |
109 | |
103 | |
82 | |
74 |