This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
I have this formula, that someone here posted it in another thread,
The below DAX formula defaults sales for current month and when other visual month is selected, it shows the correct sales for the selected month; this measure is showing in a card visual;
by default it shows the correct margin for the current month (Card visual), when selecting current month, it shows number correctly as well but when selecting other month, the number shows a zero or blank.
How can I make this work so it calculates margins for the rest of the selected months?
Thanks in advance for your help!
Solved! Go to Solution.
Hi @Midway
If both cost and sales are coming from the same table, then you need to remove the filter from the month slicer and any other column that is used as a sort by or a group by column. Even safer to remove tye filter from the date table completely.
Hi @Midway
If both cost and sales are coming from the same table, then you need to remove the filter from the month slicer and any other column that is used as a sort by or a group by column. Even safer to remove tye filter from the date table completely.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |