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.
Hi All,
I've looked through previous posts but haven't been able to work out an answer. I'm pretty new to Power BI/DAX formula.
I have two tables, one is a standard dates table, with rows for each date and columns for week month year ect
I have a second table wich is linked by the date field, and contains Fund daily prices.
What I want to be able to do is have a slicer in the report, which is linked to the Date table, which controls a start and an end date.
And I want a measure to to take the 'prices_sell' value = to the end Date in slicer, and subtract 'prices_buy' value = to the start Date in the slicer
prices_sedol prices_sell prices_buy prices_date 0001144 6.7670 7.2970 2017-06-25 0001144 6.7020 7.2310 2017-07-02 0001144 6.7140 7.2480 2017-07-09 0001144 6.7090 7.2450 2017-07-16 0001144 6.8220 7.3550 2017-07-23 0001144 6.8070 7.3480 2017-07-24 0001144 6.8580 7.3930 2017-07-25 0001144 6.9050 7.4520 2017-07-26
So for example if the slicer for date was 2017-07-02 to 2017-07-25, that would be:
Sell Price on 2017-07-25 less Buy Price on 2017-07-02
6.8580 - 7.2310 = -0.373
please help!
Thanks
epod
Solved! Go to Solution.
You could try those measures. See more details in attached pbix.
price_buy = CALCULATE(SUM('Table'[prices_buy]),FILTER('Table','Table'[prices_date]=MIN('Table'[prices_date]))) price_sell = CALCULATE(SUM('Table'[prices_sell]),FILTER('Table','Table'[prices_date]=MAX('Table'[prices_date]))) diff = [price_sell]-[price_buy]
You could try those measures. See more details in attached pbix.
price_buy = CALCULATE(SUM('Table'[prices_buy]),FILTER('Table','Table'[prices_date]=MIN('Table'[prices_date]))) price_sell = CALCULATE(SUM('Table'[prices_sell]),FILTER('Table','Table'[prices_date]=MAX('Table'[prices_date]))) diff = [price_sell]-[price_buy]
Hi,
Do the need ful for below problem statement
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |