Forum Discussion
IF function not working with Measure?
Direct Query models have a number of limitations and should be used sparingly. I think what the error is saying is your [MostRecentlyApprovedDate] measure and [Date] measure are from two different sources, and you cannot do that with a direct query model. You can with an import.
Can you confirm the tables used in each of those measures are, in fact, from different sources?
See this for limitations on DQ. It may be this one that is biting you:
"Limitations are placed on DAX expressions allowed in measures to ensure that queries sent to the underlying data source have acceptable performance."
It may cause performance issues to have the model try to send two different direct query commands to two different sources and combine into a single measure for comparison like you are trying to do.
- Domenick6 years agoHelper IV
Yes, the measure [MostRecentlyApprovedDate] relies on a data field that is in another table. I can't really avoid that; it's a relational database.
One workaround, I suppose, would be to join the tables before importing them. This would have been easy to do from the beginning, but I put a little too much faith in PowerBI. To do it now, would mean rebuilding everything from scratch. So it would be nice to be able to not have these
- edhans6 years agoCommunity Champion
It isn't another table. It mean another source. So two tables from one database are one source (or should be) but two tables from two different databases are two sources, and you cannot join those in Power Query if you are in Direct Query mode.
- Domenick6 years agoHelper IV
edhans Yeah, the error is really frustrating. I'm only using one source for this entire report. It's all finance data, so it's all in one place. I decided to just switch over to Import instead of Direct Quiery, and it seems to be working now. I'll just have to figure out refreshes later.