Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I am new to PowerBI and need some help please...
I am looking to dynamically refer to StyleCode column in my CALCULATETABLE formula, instead of only having set text of "FAR2I10".
Can someone please assist?
Thanks
In Power BI Desktop, we can't use Query Parameter in DAX formula.
@MattAllington is correct. In this scenario, it's not a good practice to hard code values for so many fields in your calculations. It's better to put those data fields into Slicer. Your measure will take your selection in slicer to calculate the corresponding result.
Regards,
Thanks all,
Can you set a slicer to auto adjust to always filter the last 6 months worth of dates or do you have to manually do this?
Much appreciated!
You may create a time period slicer in your report. Please refer to: POWER BI – TIME PERIOD SLICER FOR LAST 7 DAYS,LAST 30 DAYS.
Regards,
From what I can see in your image, you have some sort of slicer on the same text you are referring to. So just remove the text from your calculatetable statement.
Also, I am sure there is a better way to do what you are doing an hard coding all that logic in your formulas. Try to think about how you could reshape your data to do what you need.
The last 6 months portion should be pushed into a calendar table. The logic for the rest could be either managed before loading (i.e. Only load what's you need) or you could put a flag in the table to indicate if it should be included. Also, something like this would seem simpler
=calculate(Sum(table[qty]),filters)
also, try to simplify your table names. How about "Sales"
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
77 | |
73 | |
58 | |
35 | |
31 |
User | Count |
---|---|
99 | |
57 | |
56 | |
46 | |
40 |