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.
(Picture 1)
(Picture 2)
Hi there, pardon my newbie question. THis graph was done in Power BI's DirectQuery mode.
My goal: Find the value of 'Customer2'[Body_V_P0_R] (aka voltage reading for customer 2) for every 4th reading.
What I did: Created and used my index column so that I can easily extract every 4th reading.
Problem: When I change the value in the MOD function from 10 (Picture 1) to 4 (Picture 2), this error appears. I've tested, for any number less than 10, this error appears.
Note: My values for Index are in whole numbers
My queries are:
1) What is causing this issue?
2) How should I solve it?
3) Is there any other way to reach my goal in DirectQuery?
Thanks a lot!
Hi @mit1 ,
I've tried to reproduce your problem, but there are no errors.
According to the error message you provided: Unable to cast object of type System.Decimal to System.char.
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Thank you for your assitance! May I check if your experiment was done in DirectQuery mode?
My dashboard is done via DirectQuery which retrieves data from my database in azure.
---
I've tested it with the same code and same dataset in Import mode, there was no issue, it seems this problem I'm facing only surfaces in DirectQuery mode. Not sure why.
I've also tried it with my other columns, same error persists when the number is changed from 10 to <10.
---
My goal is to output the values of voltage for every 4th row (each row is generated every 5 mins).
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 |
---|---|
80 | |
76 | |
60 | |
36 | |
33 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |